devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Nuno Sá" <noname.nuno@gmail.com>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Bartosz Golaszewski" <brgl@bgdev.pl>
Cc: "Dumitru Ceclan" <mitrutzceclan@gmail.com>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Cosmin Tanislav" <demonsingur@gmail.com>,
	"Alexander Sverdlin" <alexander.sverdlin@gmail.com>,
	"Hugo Villeneuve" <hvilleneuve@dimonoff.com>,
	"Okan Sahin" <okan.sahin@analog.com>,
	"Niklas Schnelle" <schnelle@linux.ibm.com>,
	"ChiYuan Huang" <cy_huang@richtek.com>,
	"Ramona Bolboaca" <ramona.bolboaca@analog.com>,
	"Ibrahim Tilki" <Ibrahim.Tilki@analog.com>,
	"ChiaEn Wu" <chiaen_wu@richtek.com>,
	"William Breathitt Gray" <william.gray@linaro.org>,
	"Lee Jones" <lee@kernel.org>, "Haibo Chen" <haibo.chen@nxp.com>,
	"Mike Looijmans" <mike.looijmans@topic.nl>,
	"Leonard Göhrs" <l.goehrs@pengutronix.de>,
	"Ceclan Dumitru" <dumitru.ceclan@analog.com>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] iio: adc: ad717x: add AD717X driver
Date: Tue, 29 Aug 2023 14:38:03 -0400	[thread overview]
Message-ID: <8e87875b-5be1-4d82-bcbf-bd6c8d36370f@app.fastmail.com> (raw)
In-Reply-To: <ZO3zLKrZNGekV7Co@smile.fi.intel.com>

On Tue, Aug 29, 2023, at 09:31, Andy Shevchenko wrote:
> On Tue, Aug 29, 2023 at 11:14:31AM +0200, Nuno Sá wrote:
>> On Thu, 2023-08-10 at 18:36 +0300, Andy Shevchenko wrote:
>> > On Thu, Aug 10, 2023 at 01:57:02PM +0200, Nuno Sá wrote:
>> > > On Thu, 2023-08-10 at 12:33 +0300, Dumitru Ceclan wrote:
>
>> > > Is ad717x_gpio_cleanup() being used anywhere? Moreover I would maybe just
>> > > get rid of
>> > > the #ifdef wrapper and just select GPIOLIB. How often will it be disabled
>> > > anyways?
>> > 
>> > The agreement is that users are depend on and not selecting GPIOLIB.
>> > Any news in these agreement terms?
>> 
>> Hmm no idea about that. If you say so, it's just one new thing I'm learning :)
>Based outside of the U.S.? Some titles might be unavailable in your current location. Go to amazon.de to see the video catalog available in Germany.
> That's the last I know.
> Cc'ing to GPIOLIB maintainers...

From a Kconfig perspective, any user-visible symbol ideally only uses
'depends on', while hidden symbols usually use 'select'.

For the GPIOLIB symbol specifically, we have a mix of both, but the
overall usage is that gpio consumers only use 'depends on',
while some of the providers use 'select'. This risks causing build
breakage from a dependency loop when combined with other symbols
that have the same problem (e.g. I2C), but it tends to work out
as long as a strong hierarchy is kept. In particular, using 'select'
from an arch/*/Kconfig platform option is generally harmless as
long as those don't depend on anything else.

The new driver is a gpio provider and at least ad4130 and
ad5592r uses 'select' here, but then again ad74115 and
ad74113 use 'depends on' and ads7950 uses neither.

I think the best way to handle these is to remove both
the 'select' and the #ifdef in the driver and instead use
'if (IS_ENABLED(CONFIG_GPIOLIB))' to handle optional gpio
providers in the code.

       Arnd

  reply	other threads:[~2023-08-29 18:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-10  9:33 [PATCH 1/2] dt-bindings: adc: add AD717X Dumitru Ceclan
2023-08-10  9:33 ` [PATCH 2/2] iio: adc: ad717x: add AD717X driver Dumitru Ceclan
2023-08-10 11:57   ` Nuno Sá
2023-08-10 15:36     ` Andy Shevchenko
2023-08-28 17:34       ` Jonathan Cameron
2023-08-29  9:14       ` Nuno Sá
2023-08-29 13:31         ` Andy Shevchenko
2023-08-29 18:38           ` Arnd Bergmann [this message]
2023-08-28 16:52     ` Jonathan Cameron
2023-08-10 19:36   ` kernel test robot
2023-08-11  8:47   ` Andy Shevchenko
2023-08-28 17:58   ` Jonathan Cameron
2023-08-10 10:21 ` [PATCH 1/2] dt-bindings: adc: add AD717X Rob Herring
2023-08-10 20:51 ` Rob Herring
2023-08-28 17:43 ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8e87875b-5be1-4d82-bcbf-bd6c8d36370f@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=Ibrahim.Tilki@analog.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=alexander.sverdlin@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=brgl@bgdev.pl \
    --cc=chiaen_wu@richtek.com \
    --cc=conor+dt@kernel.org \
    --cc=cy_huang@richtek.com \
    --cc=demonsingur@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dumitru.ceclan@analog.com \
    --cc=haibo.chen@nxp.com \
    --cc=hvilleneuve@dimonoff.com \
    --cc=jic23@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=l.goehrs@pengutronix.de \
    --cc=lars@metafoo.de \
    --cc=lee@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike.looijmans@topic.nl \
    --cc=mitrutzceclan@gmail.com \
    --cc=noname.nuno@gmail.com \
    --cc=okan.sahin@analog.com \
    --cc=ramona.bolboaca@analog.com \
    --cc=robh+dt@kernel.org \
    --cc=schnelle@linux.ibm.com \
    --cc=william.gray@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).