From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 586F04772A9 for ; Thu, 13 Aug 2026 12:55:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786625718; cv=none; b=seqDmuk7+k04hQCzXmTYLXEenwAL3MA6dlWR5BKqNCKQyYlLedTp9VjZc0NsTd/no/3OkaX1YUeaTjXjZGALf1m5+4cTI0fpTCjMqQYt9orNwE2/8B95UB+EOY9igIXcAT+t0/syuy9pkswDOU7x0dww0nW/3VN40YthTj9KwEQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786625718; c=relaxed/simple; bh=HrpuHtXRs3lkzPV2KF4jr4RPVBEPyIUfTr35gw5M1iI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=nQklAOVtX6DFjMLaE4yF97Emk4ErRDjPIqUPhDFSYmBCh+gUS7GIx0Sg7nLLWaYXDZKoLURfUZ4Eigja1FrYbnMCVBv6ZCfl/7HVITf58sU25nTBAUgUt7Cc2EfZA6XGzhWzdlG5IPnjYfQK9/xUMh3mLaUhn8ahIaaQQ3Bal0Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=BOn0wESQ; arc=none smtp.client-ip=209.85.167.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BOn0wESQ" Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-5b021916bd3so939850e87.3 for ; Thu, 13 Aug 2026 05:55:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786625714; x=1787230514; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=9jhcvNWSwuNAllGIhB4lzw/CqsOc6VTmvp2k274Uc3o=; b=BOn0wESQ+2KXUfLqYEyKA7tfVWjGL0NzreOazkA7IAImC5ucSAw39LOMfRQ3UEcvEv wj3Rna02ifbHSVQffk3mukJmy+YYpoaa1kKKstx2j81X7rSSEANTzC1U7rUJ9qNm3JCN ommatv8rgP5qeRD+TuT52BSwfgkz4UnOZDUQZZHDnlp2gasjvEI9GaikuWeBbHJUdBkg 63J+xha/o4O8sN6tQHm/SAMjYzHtNjd1AEVkpWnAEMIxjx6oFhZLntwfUERovklFT7bX SlcSo2AMaJjObiH5DpfPlcGQYwuub9X//jvfJXCsQewrat1qAnynTf9H7PPT++REqjBR x1uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786625714; x=1787230514; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=9jhcvNWSwuNAllGIhB4lzw/CqsOc6VTmvp2k274Uc3o=; b=PMVkl98/F9cku1Dk6McmOnZHZOnsp+T8pQc5wjPFafSUGjNBS5MGxj+TMdFsPSeV6M gACZjUbSWBUslEZ1qh1/zVMdcdrpLXA3ebh7Pf5QAh6O4/qEKoFohkl3I/HHi/vUlCuT tI1wztCkJku4yi92TF9cyX+bfL66oMUNjdpdAKVgk9y8TA1vIu+2QeqqQFN5g5pn6Ey1 nhfomHGpA3hgxvmGZUDo/CNslLeoRckzzX7pB9R/jIGwzpCl2iXflEv93iS45vjrzmRf ay1sI26WOZl5hLkjyAZwUuPwR7JxzTQkshiQlZknyMM2SGy2n/RiIVHlIKBQYsGkQdZ4 NJPQ== X-Forwarded-Encrypted: i=1; AHgh+RrFAXot2URkm6JA+/pp77OTlfT7Ca/WCcN4ExhCXNppNVqYsiwwFGb2Gso5Xp0/b1+meW42JKcgegAQrMM=@vger.kernel.org X-Gm-Message-State: AOJu0YxMInyA+oRKWAaguE2TbmpI1RPrLK3FW6+pmSkVj0jNPeMnAq6N V6331oF5CIfUbRxRUg9/JcAkmC2q5ZT7YWdjD7oqcO2HQGKlIDhmFJ3/ X-Gm-Gg: AR+sD11VyB6WU1eydNH5A8eEkP4xKt5ngG8VE0ev67UWbULHhlu7FVbXYC1YBblHuZi rlE3FIgcd9anPdlqrxFGcsyKtEHsAoK2oo6O8NxABWAcAi3EoiclqqG4rpKAzYjy4xnRTd9epwU YS6wKo1g8waUPbWionAxt1Gqtv8KVsRz02Moc9wBlNdAvSxHGIThF1H65kct/nKbCa/l6WKFb9L +QkOCpumUTP69T2OBO7Qxx5YZyVbkiCnQPjVxGcd7CQBUKY25elJSQ9txF1w0LsLEVEVGz4++CW WkBwXodpADpVmg+CTGNhzsH3ILubakWcENfJ4lxoNJQgERMUlzXuWispDwEGXMnio2PMGm0kWL2 t5EUNCJ1yalX4biuOCdydwKUAAtU1kPOoL5vFrs47rhdSvfzRpQSALEg0xmjR9TgTY+5n7I8LaN xR6dI9O7OgvJCQc8KyPTA0p+AF9niuTAucsnC1n+xZsmfrexJBWz8yJucQ4vpQaywX5h8TezBj3 zdq/teG43MJkVAsyCF4CLD1+beqskpzXXEPPbFJhOu8B+EiyK514A4h X-Received: by 2002:a05:6512:1284:b0:5ae:b0c0:16bc with SMTP id 2adb3069b0e04-5b453f77a1dmr809693e87.27.1786625714101; Thu, 13 Aug 2026 05:55:14 -0700 (PDT) Received: from ?IPV6:2a10:a5c0:800d:dd00:8fdf:935a:2c85:d703? ([2a10:a5c0:800d:dd00:8fdf:935a:2c85:d703]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5b4539ea237sm456405e87.18.2026.08.13.05.55.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 13 Aug 2026 05:55:13 -0700 (PDT) Message-ID: <12f70e0f-5cef-4035-9b44-e2cb252932cf@gmail.com> Date: Thu, 13 Aug 2026 15:55:12 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 09/10] gpio: bd73800: Support ROHM BD73800 PMIC GPIOs To: Linus Walleij Cc: Matti Vaittinen , Matti Vaittinen , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Liam Girdwood , Mark Brown , Michael Turquette , Stephen Boyd , Brian Masney , Bartosz Golaszewski , Alexandre Belloni , mfd@lists.linux.dev, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, linux-rtc@vger.kernel.org References: <9774b8d6663ea55b1682b32f825ec5689be3e1d8.1785838585.git.mazziesaccount@gmail.com> Content-Language: en-US, en-AU, en-GB, en-BW From: Matti Vaittinen In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 13/08/2026 11:34, Matti Vaittinen wrote: > On 07/08/2026 23:29, Linus Walleij wrote: ... >>   * @fixed_direction_output: >>   *                      (Optional) Bitmap representing the fixed >> direction of >>   *                      the GPIO lines. Useful when there are GPIO >> lines with a >>   *                      fixed direction mixed together in the same >> register. >> >> It seems you can set up the fixed_direction_output mask from OTP >> and just use the library, right? > > The BD73800 uses different registers for 'out' and 'in'. So there aren't > really "GPIO lines with a fixed direction mixed together in the same > register". ... > I think the BD73800 can indeed use the gpio-regmap, by keeping the pin > direction information in private data and adding a custom xlate, which > errors out if get is requested for output pin, or set is requested for > input. I am not sure how much of an improvement it is compared to the > patch v2, but I'll give it a shot :) I believe the new -rc1 isn't that > far away, and hopefully the gpio-regmap -stuff from the next will be in > it together with the regulator stuff bindings depended. Gah. Please, ignore the erroring-out part. I don't know where I picked the idea that the hardware would always return '0' when reading the GPO_OUT register. I think this might have been something I have experienced on a setup where the pin was _not_ set to GPO by OTP. Furthermore, the xlate will never get called if user tries to set value for a GPI pin. Anyways, implementing xlate with op-check allows me to support this PMIC, even though the register to read for pin status depends on OTP. So yes, v3 should be able to use gpio-regmap. I will probably delay sending it until v7.3-rc1 is out so I get (all?) dependencies in. Yours, -- Matti -- Matti Vaittinen Linux kernel developer at ROHM Semiconductors Oulu Finland ~~ When things go utterly wrong vim users can always type :help! ~~