public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
	Kent Gibson <warthog618@gmail.com>,
	linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org,
	brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Arend van Spriel <arend.vanspriel@broadcom.com>,
	Kalle Valo <kvalo@kernel.org>,
	Charles Keepax <ckeepax@opensource.cirrus.com>
Subject: Re: [PATCH v2 1/2] gpiolib: Fix a mess with the GPIO_* flags
Date: Wed, 17 Apr 2024 11:45:36 +0300	[thread overview]
Message-ID: <Zh-MMAjf6hhNOCpL@smile.fi.intel.com> (raw)
In-Reply-To: <CAMRc=MeXV4_MT5_DKYtHqO+324dFJnr+Y1UtR9w9mj-y2OOqAw@mail.gmail.com>

On Tue, Apr 16, 2024 at 11:07:58PM +0200, Bartosz Golaszewski wrote:
> On Tue, Apr 16, 2024 at 4:05 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> >
> > On Tue, Apr 16, 2024 at 02:22:09PM +0200, Linus Walleij wrote:
> > > On Fri, Apr 12, 2024 at 9:44 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> > >
> > > > IIUC include/dt-bindings/ headers should only be used by DT sources
> > > > and code that parses the OF properties.
> > >
> > > That's what I have come to understand as well.
> > >
> > > I wonder if there is something that can be done to enforce it?
> > >
> > > Ideally the code that parses OF properties should have to
> > > opt in to get access to the <dt-bindings/*> namespace.
> >
> > Whatever you, guys, come up with as a solution, can it be fixed sooner than later?
> > I mean, I would appreciate if somebody got it done for v6.9-rcX/v6.10-rc1 so we don't
> > need to look into this again.
> 
> I'm not sure you got what I was saying. I don't think this can be
> fixed quickly. This is just another bunch of technical debt that will
> have to be addressed carefully on a case-by-case basis and run through
> autobuilders in all possible configurations.
> 
> This type of include-related issues is always brittle and will lead to
> build failures if we don't consider our moves.

I proposed a quick fix which was rejected. I think this is still doable in a
few steps:

- align constant values in DT and enum
- drop usage of DT in the kernel code (That's what you want IIUC, however
  I disagree with this from technical perspective as DT constants can be used
  in the code as long as they are mapped 1:1 to what code does. That's current
  state of affairs. OTOH semantically this may be an issue.)
- restore enum usage treewide (?)

Again, the problem now is only in open source / open drain configurations
and there are only a few users of these flags _in kernel_. I do not see
why it can not be done in one or two evenings time range.

P.S>
Most of the time I spent when prepared the proposed fix is digging the history
and trying to understand how comes that we have desynchronisation of the values
over the time. The output of that is the list of Fixes tags.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2024-04-17  8:45 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-08 23:12 [PATCH v2 0/2] gpiolib: Fix gpio_lookup_flags mess and add Return sections Andy Shevchenko
2024-04-08 23:12 ` [PATCH v2 1/2] gpiolib: Fix a mess with the GPIO_* flags Andy Shevchenko
2024-04-09  4:38   ` kernel test robot
2024-04-09  8:12   ` kernel test robot
2024-04-09  9:42   ` Bartosz Golaszewski
2024-04-09 12:51     ` Andy Shevchenko
2024-04-09 12:55       ` Bartosz Golaszewski
2024-04-09 13:30         ` Andy Shevchenko
2024-04-12  8:20   ` Linus Walleij
2024-04-12 15:25     ` Andy Shevchenko
2024-04-12 19:43       ` Bartosz Golaszewski
2024-04-16 12:22         ` Linus Walleij
2024-04-16 14:05           ` Andy Shevchenko
2024-04-16 21:07             ` Bartosz Golaszewski
2024-04-17  8:45               ` Andy Shevchenko [this message]
2024-04-17 18:39                 ` Bartosz Golaszewski
2024-04-18 11:52                   ` Andy Shevchenko
2024-04-19 13:29                   ` Linus Walleij
2024-04-19 13:38                     ` Andy Shevchenko
2024-04-08 23:12 ` [PATCH v2 2/2] gpiolib: Update the kernel documentation - add Return sections Andy Shevchenko
2024-04-09 12:51   ` Andy Shevchenko
2024-04-09 14:01     ` Bartosz Golaszewski
2024-04-09 14:06       ` Andy Shevchenko
2024-04-09 14:18         ` Bartosz Golaszewski
2024-04-09 14:29           ` Andy Shevchenko

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=Zh-MMAjf6hhNOCpL@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=arend.vanspriel@broadcom.com \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=brcm80211-dev-list.pdl@broadcom.com \
    --cc=brcm80211@lists.linux.dev \
    --cc=brgl@bgdev.pl \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kvalo@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=robh+dt@kernel.org \
    --cc=warthog618@gmail.com \
    /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