diff mbox series

[v1,1/3] device property: Implement device_is_big_endian()

Message ID 20231025184259.250588-2-andriy.shevchenko@linux.intel.com
State New
Headers show
Series gpio: mmio: Make driver agnostic | expand

Commit Message

Andy Shevchenko Oct. 25, 2023, 6:42 p.m. UTC
Some users want to use the struct device pointer to see if the
device is big endian in terms of Open Firmware specifications,
i.e. if it has a "big-endian" property, or if the kernel was
compiled for BE *and* the device has a "native-endian" property.

Provide inline helper for the users.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 include/linux/property.h | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

Comments

Greg KH Oct. 26, 2023, 5:25 a.m. UTC | #1
On Wed, Oct 25, 2023 at 09:42:57PM +0300, Andy Shevchenko wrote:
> Some users want to use the struct device pointer to see if the
> device is big endian in terms of Open Firmware specifications,
> i.e. if it has a "big-endian" property, or if the kernel was
> compiled for BE *and* the device has a "native-endian" property.
> 
> Provide inline helper for the users.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  include/linux/property.h | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andy Shevchenko Oct. 26, 2023, 12:27 p.m. UTC | #2
On Thu, Oct 26, 2023 at 07:25:35AM +0200, Greg Kroah-Hartman wrote:
> On Wed, Oct 25, 2023 at 09:42:57PM +0300, Andy Shevchenko wrote:
> > Some users want to use the struct device pointer to see if the
> > device is big endian in terms of Open Firmware specifications,
> > i.e. if it has a "big-endian" property, or if the kernel was
> > compiled for BE *and* the device has a "native-endian" property.
> > 
> > Provide inline helper for the users.
> 
> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Thank you, Greg.

Bart, would it be still possible to take this into next?
I would like to have at least this patch applied (with the first user)
to allow conversion of others (I have some more users of new API).
Andy Shevchenko Nov. 2, 2023, 3:33 p.m. UTC | #3
On Thu, Oct 26, 2023 at 03:27:30PM +0300, Andy Shevchenko wrote:
> On Thu, Oct 26, 2023 at 07:25:35AM +0200, Greg Kroah-Hartman wrote:
> > On Wed, Oct 25, 2023 at 09:42:57PM +0300, Andy Shevchenko wrote:
> > > Some users want to use the struct device pointer to see if the
> > > device is big endian in terms of Open Firmware specifications,
> > > i.e. if it has a "big-endian" property, or if the kernel was
> > > compiled for BE *and* the device has a "native-endian" property.
> > > 
> > > Provide inline helper for the users.
> > 
> > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> 
> Thank you, Greg.
> 
> Bart, would it be still possible to take this into next?
> I would like to have at least this patch applied (with the first user)
> to allow conversion of others (I have some more users of new API).

Okay, seems we missed v6.7 with this, can you then prepare an immutable
branch / tag with this, so other maintainers can pull in case it's needed?
(I have something against tty already and perhaps something else, let's
 see.)
Greg KH Nov. 2, 2023, 3:58 p.m. UTC | #4
On Thu, Nov 02, 2023 at 05:33:40PM +0200, Andy Shevchenko wrote:
> On Thu, Oct 26, 2023 at 03:27:30PM +0300, Andy Shevchenko wrote:
> > On Thu, Oct 26, 2023 at 07:25:35AM +0200, Greg Kroah-Hartman wrote:
> > > On Wed, Oct 25, 2023 at 09:42:57PM +0300, Andy Shevchenko wrote:
> > > > Some users want to use the struct device pointer to see if the
> > > > device is big endian in terms of Open Firmware specifications,
> > > > i.e. if it has a "big-endian" property, or if the kernel was
> > > > compiled for BE *and* the device has a "native-endian" property.
> > > > 
> > > > Provide inline helper for the users.
> > > 
> > > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > 
> > Thank you, Greg.
> > 
> > Bart, would it be still possible to take this into next?
> > I would like to have at least this patch applied (with the first user)
> > to allow conversion of others (I have some more users of new API).
> 
> Okay, seems we missed v6.7 with this, can you then prepare an immutable
> branch / tag with this, so other maintainers can pull in case it's needed?
> (I have something against tty already and perhaps something else, let's
>  see.)

After -rc1 is out, I'll look into it, can't do anything until then,
sorry...

greg k-h
Andy Shevchenko Nov. 2, 2023, 4:47 p.m. UTC | #5
On Thu, Nov 02, 2023 at 04:58:53PM +0100, Greg Kroah-Hartman wrote:
> On Thu, Nov 02, 2023 at 05:33:40PM +0200, Andy Shevchenko wrote:
> > On Thu, Oct 26, 2023 at 03:27:30PM +0300, Andy Shevchenko wrote:
> > > On Thu, Oct 26, 2023 at 07:25:35AM +0200, Greg Kroah-Hartman wrote:
> > > > On Wed, Oct 25, 2023 at 09:42:57PM +0300, Andy Shevchenko wrote:
> > > > > Some users want to use the struct device pointer to see if the
> > > > > device is big endian in terms of Open Firmware specifications,
> > > > > i.e. if it has a "big-endian" property, or if the kernel was
> > > > > compiled for BE *and* the device has a "native-endian" property.
> > > > > 
> > > > > Provide inline helper for the users.
> > > > 
> > > > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > 
> > > Thank you, Greg.
> > > 
> > > Bart, would it be still possible to take this into next?
> > > I would like to have at least this patch applied (with the first user)
> > > to allow conversion of others (I have some more users of new API).
> > 
> > Okay, seems we missed v6.7 with this, can you then prepare an immutable
> > branch / tag with this, so other maintainers can pull in case it's needed?
> > (I have something against tty already and perhaps something else, let's
> >  see.)
> 
> After -rc1 is out, I'll look into it, can't do anything until then,
> sorry...

No problem, this is actually a great news!
Bartosz Golaszewski Nov. 3, 2023, 9:08 a.m. UTC | #6
On Thu, Nov 2, 2023 at 4:33 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Thu, Oct 26, 2023 at 03:27:30PM +0300, Andy Shevchenko wrote:
> > On Thu, Oct 26, 2023 at 07:25:35AM +0200, Greg Kroah-Hartman wrote:
> > > On Wed, Oct 25, 2023 at 09:42:57PM +0300, Andy Shevchenko wrote:
> > > > Some users want to use the struct device pointer to see if the
> > > > device is big endian in terms of Open Firmware specifications,
> > > > i.e. if it has a "big-endian" property, or if the kernel was
> > > > compiled for BE *and* the device has a "native-endian" property.
> > > >
> > > > Provide inline helper for the users.
> > >
> > > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >
> > Thank you, Greg.
> >
> > Bart, would it be still possible to take this into next?
> > I would like to have at least this patch applied (with the first user)
> > to allow conversion of others (I have some more users of new API).
>
> Okay, seems we missed v6.7 with this, can you then prepare an immutable
> branch / tag with this, so other maintainers can pull in case it's needed?
> (I have something against tty already and perhaps something else, let's
>  see.)
>

It arrived too late in the cycle, I needed to send my PR earlier this
time as I was OoO this week.

Bart
Bartosz Golaszewski Nov. 15, 2023, 2:58 p.m. UTC | #7
On Fri, Nov 3, 2023 at 10:08 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
>
> On Thu, Nov 2, 2023 at 4:33 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> >
> > On Thu, Oct 26, 2023 at 03:27:30PM +0300, Andy Shevchenko wrote:
> > > On Thu, Oct 26, 2023 at 07:25:35AM +0200, Greg Kroah-Hartman wrote:
> > > > On Wed, Oct 25, 2023 at 09:42:57PM +0300, Andy Shevchenko wrote:
> > > > > Some users want to use the struct device pointer to see if the
> > > > > device is big endian in terms of Open Firmware specifications,
> > > > > i.e. if it has a "big-endian" property, or if the kernel was
> > > > > compiled for BE *and* the device has a "native-endian" property.
> > > > >
> > > > > Provide inline helper for the users.
> > > >
> > > > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > >
> > > Thank you, Greg.
> > >
> > > Bart, would it be still possible to take this into next?
> > > I would like to have at least this patch applied (with the first user)
> > > to allow conversion of others (I have some more users of new API).
> >
> > Okay, seems we missed v6.7 with this, can you then prepare an immutable
> > branch / tag with this, so other maintainers can pull in case it's needed?
> > (I have something against tty already and perhaps something else, let's
> >  see.)
> >
>
> It arrived too late in the cycle, I needed to send my PR earlier this
> time as I was OoO this week.
>
> Bart

Greg, will you take this patch through your tree and provide me with
an immutable tag for this cycle?

Bart
Greg KH Nov. 15, 2023, 8:21 p.m. UTC | #8
On Wed, Nov 15, 2023 at 03:58:54PM +0100, Bartosz Golaszewski wrote:
> On Fri, Nov 3, 2023 at 10:08 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> >
> > On Thu, Nov 2, 2023 at 4:33 PM Andy Shevchenko
> > <andriy.shevchenko@linux.intel.com> wrote:
> > >
> > > On Thu, Oct 26, 2023 at 03:27:30PM +0300, Andy Shevchenko wrote:
> > > > On Thu, Oct 26, 2023 at 07:25:35AM +0200, Greg Kroah-Hartman wrote:
> > > > > On Wed, Oct 25, 2023 at 09:42:57PM +0300, Andy Shevchenko wrote:
> > > > > > Some users want to use the struct device pointer to see if the
> > > > > > device is big endian in terms of Open Firmware specifications,
> > > > > > i.e. if it has a "big-endian" property, or if the kernel was
> > > > > > compiled for BE *and* the device has a "native-endian" property.
> > > > > >
> > > > > > Provide inline helper for the users.
> > > > >
> > > > > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > >
> > > > Thank you, Greg.
> > > >
> > > > Bart, would it be still possible to take this into next?
> > > > I would like to have at least this patch applied (with the first user)
> > > > to allow conversion of others (I have some more users of new API).
> > >
> > > Okay, seems we missed v6.7 with this, can you then prepare an immutable
> > > branch / tag with this, so other maintainers can pull in case it's needed?
> > > (I have something against tty already and perhaps something else, let's
> > >  see.)
> > >
> >
> > It arrived too late in the cycle, I needed to send my PR earlier this
> > time as I was OoO this week.
> >
> > Bart
> 
> Greg, will you take this patch through your tree and provide me with
> an immutable tag for this cycle?

Sure, let me catch up with patches after I return from Plumbers next
week.

greg k-h
Andy Shevchenko Dec. 7, 2023, 2:19 p.m. UTC | #9
On Wed, Nov 15, 2023 at 03:21:29PM -0500, Greg Kroah-Hartman wrote:
> On Wed, Nov 15, 2023 at 03:58:54PM +0100, Bartosz Golaszewski wrote:
> > On Fri, Nov 3, 2023 at 10:08 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> > > On Thu, Nov 2, 2023 at 4:33 PM Andy Shevchenko
> > > <andriy.shevchenko@linux.intel.com> wrote:
> > > > On Thu, Oct 26, 2023 at 03:27:30PM +0300, Andy Shevchenko wrote:
> > > > > On Thu, Oct 26, 2023 at 07:25:35AM +0200, Greg Kroah-Hartman wrote:
> > > > > > On Wed, Oct 25, 2023 at 09:42:57PM +0300, Andy Shevchenko wrote:
> > > > > > > Some users want to use the struct device pointer to see if the
> > > > > > > device is big endian in terms of Open Firmware specifications,
> > > > > > > i.e. if it has a "big-endian" property, or if the kernel was
> > > > > > > compiled for BE *and* the device has a "native-endian" property.
> > > > > > >
> > > > > > > Provide inline helper for the users.
> > > > > >
> > > > > > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > > >
> > > > > Thank you, Greg.
> > > > >
> > > > > Bart, would it be still possible to take this into next?
> > > > > I would like to have at least this patch applied (with the first user)
> > > > > to allow conversion of others (I have some more users of new API).
> > > >
> > > > Okay, seems we missed v6.7 with this, can you then prepare an immutable
> > > > branch / tag with this, so other maintainers can pull in case it's needed?
> > > > (I have something against tty already and perhaps something else, let's
> > > >  see.)
> > >
> > > It arrived too late in the cycle, I needed to send my PR earlier this
> > > time as I was OoO this week.
> >
> > Greg, will you take this patch through your tree and provide me with
> > an immutable tag for this cycle?
> 
> Sure, let me catch up with patches after I return from Plumbers next
> week.

Hope Plumbers went well!
Greg KH Dec. 15, 2023, 2:49 p.m. UTC | #10
On Thu, Dec 07, 2023 at 04:19:22PM +0200, Andy Shevchenko wrote:
> On Wed, Nov 15, 2023 at 03:21:29PM -0500, Greg Kroah-Hartman wrote:
> > On Wed, Nov 15, 2023 at 03:58:54PM +0100, Bartosz Golaszewski wrote:
> > > On Fri, Nov 3, 2023 at 10:08 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> > > > On Thu, Nov 2, 2023 at 4:33 PM Andy Shevchenko
> > > > <andriy.shevchenko@linux.intel.com> wrote:
> > > > > On Thu, Oct 26, 2023 at 03:27:30PM +0300, Andy Shevchenko wrote:
> > > > > > On Thu, Oct 26, 2023 at 07:25:35AM +0200, Greg Kroah-Hartman wrote:
> > > > > > > On Wed, Oct 25, 2023 at 09:42:57PM +0300, Andy Shevchenko wrote:
> > > > > > > > Some users want to use the struct device pointer to see if the
> > > > > > > > device is big endian in terms of Open Firmware specifications,
> > > > > > > > i.e. if it has a "big-endian" property, or if the kernel was
> > > > > > > > compiled for BE *and* the device has a "native-endian" property.
> > > > > > > >
> > > > > > > > Provide inline helper for the users.
> > > > > > >
> > > > > > > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > > > >
> > > > > > Thank you, Greg.
> > > > > >
> > > > > > Bart, would it be still possible to take this into next?
> > > > > > I would like to have at least this patch applied (with the first user)
> > > > > > to allow conversion of others (I have some more users of new API).
> > > > >
> > > > > Okay, seems we missed v6.7 with this, can you then prepare an immutable
> > > > > branch / tag with this, so other maintainers can pull in case it's needed?
> > > > > (I have something against tty already and perhaps something else, let's
> > > > >  see.)
> > > >
> > > > It arrived too late in the cycle, I needed to send my PR earlier this
> > > > time as I was OoO this week.
> > >
> > > Greg, will you take this patch through your tree and provide me with
> > > an immutable tag for this cycle?
> > 
> > Sure, let me catch up with patches after I return from Plumbers next
> > week.
> 
> Hope Plumbers went well!

Sorry for the delay, immutable tag can be found at:
	git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git device_is_big_endian-6.8-rc1
for anyone to pull from now.

thanks,

greg k-h
Andy Shevchenko Dec. 15, 2023, 3:08 p.m. UTC | #11
On Fri, Dec 15, 2023 at 03:49:38PM +0100, Greg Kroah-Hartman wrote:
> On Thu, Dec 07, 2023 at 04:19:22PM +0200, Andy Shevchenko wrote:
> > On Wed, Nov 15, 2023 at 03:21:29PM -0500, Greg Kroah-Hartman wrote:
> > > On Wed, Nov 15, 2023 at 03:58:54PM +0100, Bartosz Golaszewski wrote:
> > > > On Fri, Nov 3, 2023 at 10:08 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> > > > > On Thu, Nov 2, 2023 at 4:33 PM Andy Shevchenko
> > > > > <andriy.shevchenko@linux.intel.com> wrote:
> > > > > > On Thu, Oct 26, 2023 at 03:27:30PM +0300, Andy Shevchenko wrote:
> > > > > > > On Thu, Oct 26, 2023 at 07:25:35AM +0200, Greg Kroah-Hartman wrote:
> > > > > > > > On Wed, Oct 25, 2023 at 09:42:57PM +0300, Andy Shevchenko wrote:

...

> > > > > > > > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > > > > >
> > > > > > > Thank you, Greg.
> > > > > > >
> > > > > > > Bart, would it be still possible to take this into next?
> > > > > > > I would like to have at least this patch applied (with the first user)
> > > > > > > to allow conversion of others (I have some more users of new API).
> > > > > >
> > > > > > Okay, seems we missed v6.7 with this, can you then prepare an immutable
> > > > > > branch / tag with this, so other maintainers can pull in case it's needed?
> > > > > > (I have something against tty already and perhaps something else, let's
> > > > > >  see.)
> > > > >
> > > > > It arrived too late in the cycle, I needed to send my PR earlier this
> > > > > time as I was OoO this week.
> > > >
> > > > Greg, will you take this patch through your tree and provide me with
> > > > an immutable tag for this cycle?
> > > 
> > > Sure, let me catch up with patches after I return from Plumbers next
> > > week.
> > 
> > Hope Plumbers went well!
> 
> Sorry for the delay, immutable tag can be found at:
> 	git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git device_is_big_endian-6.8-rc1
> for anyone to pull from now.

No problem and thank you!

Bart, can you pull that? Or should I to my tree and then push with other
GPIO patches?
Bartosz Golaszewski Dec. 18, 2023, 10:35 a.m. UTC | #12
On Fri, Dec 15, 2023 at 4:11 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Fri, Dec 15, 2023 at 03:49:38PM +0100, Greg Kroah-Hartman wrote:
> > On Thu, Dec 07, 2023 at 04:19:22PM +0200, Andy Shevchenko wrote:
> > > On Wed, Nov 15, 2023 at 03:21:29PM -0500, Greg Kroah-Hartman wrote:
> > > > On Wed, Nov 15, 2023 at 03:58:54PM +0100, Bartosz Golaszewski wrote:
> > > > > On Fri, Nov 3, 2023 at 10:08 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> > > > > > On Thu, Nov 2, 2023 at 4:33 PM Andy Shevchenko
> > > > > > <andriy.shevchenko@linux.intel.com> wrote:
> > > > > > > On Thu, Oct 26, 2023 at 03:27:30PM +0300, Andy Shevchenko wrote:
> > > > > > > > On Thu, Oct 26, 2023 at 07:25:35AM +0200, Greg Kroah-Hartman wrote:
> > > > > > > > > On Wed, Oct 25, 2023 at 09:42:57PM +0300, Andy Shevchenko wrote:
>
> ...
>
> > > > > > > > > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > > > > > >
> > > > > > > > Thank you, Greg.
> > > > > > > >
> > > > > > > > Bart, would it be still possible to take this into next?
> > > > > > > > I would like to have at least this patch applied (with the first user)
> > > > > > > > to allow conversion of others (I have some more users of new API).
> > > > > > >
> > > > > > > Okay, seems we missed v6.7 with this, can you then prepare an immutable
> > > > > > > branch / tag with this, so other maintainers can pull in case it's needed?
> > > > > > > (I have something against tty already and perhaps something else, let's
> > > > > > >  see.)
> > > > > >
> > > > > > It arrived too late in the cycle, I needed to send my PR earlier this
> > > > > > time as I was OoO this week.
> > > > >
> > > > > Greg, will you take this patch through your tree and provide me with
> > > > > an immutable tag for this cycle?
> > > >
> > > > Sure, let me catch up with patches after I return from Plumbers next
> > > > week.
> > >
> > > Hope Plumbers went well!
> >
> > Sorry for the delay, immutable tag can be found at:
> >       git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git device_is_big_endian-6.8-rc1
> > for anyone to pull from now.
>
> No problem and thank you!
>
> Bart, can you pull that? Or should I to my tree and then push with other
> GPIO patches?
>

Ugh, this is rebased on top of 6.7-rc3...

My tree is based on rc1, if I pull it, then it'll be a mess.

Andy: How badly do you want it in v6.8? Can this wait until after the
merge window?

Bart

> --
> With Best Regards,
> Andy Shevchenko
>
>
Andy Shevchenko Dec. 18, 2023, 10:55 a.m. UTC | #13
On Mon, Dec 18, 2023 at 11:35:04AM +0100, Bartosz Golaszewski wrote:
> On Fri, Dec 15, 2023 at 4:11 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > On Fri, Dec 15, 2023 at 03:49:38PM +0100, Greg Kroah-Hartman wrote:
> > > On Thu, Dec 07, 2023 at 04:19:22PM +0200, Andy Shevchenko wrote:
> > > > On Wed, Nov 15, 2023 at 03:21:29PM -0500, Greg Kroah-Hartman wrote:
> > > > > On Wed, Nov 15, 2023 at 03:58:54PM +0100, Bartosz Golaszewski wrote:
> > > > > > On Fri, Nov 3, 2023 at 10:08 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> > > > > > > On Thu, Nov 2, 2023 at 4:33 PM Andy Shevchenko
> > > > > > > <andriy.shevchenko@linux.intel.com> wrote:
> > > > > > > > On Thu, Oct 26, 2023 at 03:27:30PM +0300, Andy Shevchenko wrote:
> > > > > > > > > On Thu, Oct 26, 2023 at 07:25:35AM +0200, Greg Kroah-Hartman wrote:
> > > > > > > > > > On Wed, Oct 25, 2023 at 09:42:57PM +0300, Andy Shevchenko wrote:

...

> > > > > > > > > > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > > > > > > >
> > > > > > > > > Thank you, Greg.
> > > > > > > > >
> > > > > > > > > Bart, would it be still possible to take this into next?
> > > > > > > > > I would like to have at least this patch applied (with the first user)
> > > > > > > > > to allow conversion of others (I have some more users of new API).
> > > > > > > >
> > > > > > > > Okay, seems we missed v6.7 with this, can you then prepare an immutable
> > > > > > > > branch / tag with this, so other maintainers can pull in case it's needed?
> > > > > > > > (I have something against tty already and perhaps something else, let's
> > > > > > > >  see.)
> > > > > > >
> > > > > > > It arrived too late in the cycle, I needed to send my PR earlier this
> > > > > > > time as I was OoO this week.
> > > > > >
> > > > > > Greg, will you take this patch through your tree and provide me with
> > > > > > an immutable tag for this cycle?
> > > > >
> > > > > Sure, let me catch up with patches after I return from Plumbers next
> > > > > week.
> > > >
> > > > Hope Plumbers went well!
> > >
> > > Sorry for the delay, immutable tag can be found at:
> > >       git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git device_is_big_endian-6.8-rc1
> > > for anyone to pull from now.
> >
> > No problem and thank you!
> >
> > Bart, can you pull that? Or should I to my tree and then push with other
> > GPIO patches?
> 
> Ugh, this is rebased on top of 6.7-rc3...
> 
> My tree is based on rc1, if I pull it, then it'll be a mess.

But v6.7-rc3 is something that is already in the upstream.
I don't see how it can be more "mess" with this. Whatever...

> Andy: How badly do you want it in v6.8? Can this wait until after the
> merge window?

I waited for a cycle already with this...

OTOH GPIO part is not anyhow critical from the semantic point of view.
Since the main patch is in Greg's tree I'll survive with GPIO stuff
going next cycle.
Bartosz Golaszewski Dec. 18, 2023, 11:05 a.m. UTC | #14
On Mon, Dec 18, 2023 at 11:56 AM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Mon, Dec 18, 2023 at 11:35:04AM +0100, Bartosz Golaszewski wrote:
> > On Fri, Dec 15, 2023 at 4:11 PM Andy Shevchenko
> > <andriy.shevchenko@linux.intel.com> wrote:
> > > On Fri, Dec 15, 2023 at 03:49:38PM +0100, Greg Kroah-Hartman wrote:
> > > > On Thu, Dec 07, 2023 at 04:19:22PM +0200, Andy Shevchenko wrote:
> > > > > On Wed, Nov 15, 2023 at 03:21:29PM -0500, Greg Kroah-Hartman wrote:
> > > > > > On Wed, Nov 15, 2023 at 03:58:54PM +0100, Bartosz Golaszewski wrote:
> > > > > > > On Fri, Nov 3, 2023 at 10:08 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> > > > > > > > On Thu, Nov 2, 2023 at 4:33 PM Andy Shevchenko
> > > > > > > > <andriy.shevchenko@linux.intel.com> wrote:
> > > > > > > > > On Thu, Oct 26, 2023 at 03:27:30PM +0300, Andy Shevchenko wrote:
> > > > > > > > > > On Thu, Oct 26, 2023 at 07:25:35AM +0200, Greg Kroah-Hartman wrote:
> > > > > > > > > > > On Wed, Oct 25, 2023 at 09:42:57PM +0300, Andy Shevchenko wrote:
>
> ...
>
> > > > > > > > > > > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > > > > > > > >
> > > > > > > > > > Thank you, Greg.
> > > > > > > > > >
> > > > > > > > > > Bart, would it be still possible to take this into next?
> > > > > > > > > > I would like to have at least this patch applied (with the first user)
> > > > > > > > > > to allow conversion of others (I have some more users of new API).
> > > > > > > > >
> > > > > > > > > Okay, seems we missed v6.7 with this, can you then prepare an immutable
> > > > > > > > > branch / tag with this, so other maintainers can pull in case it's needed?
> > > > > > > > > (I have something against tty already and perhaps something else, let's
> > > > > > > > >  see.)
> > > > > > > >
> > > > > > > > It arrived too late in the cycle, I needed to send my PR earlier this
> > > > > > > > time as I was OoO this week.
> > > > > > >
> > > > > > > Greg, will you take this patch through your tree and provide me with
> > > > > > > an immutable tag for this cycle?
> > > > > >
> > > > > > Sure, let me catch up with patches after I return from Plumbers next
> > > > > > week.
> > > > >
> > > > > Hope Plumbers went well!
> > > >
> > > > Sorry for the delay, immutable tag can be found at:
> > > >       git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git device_is_big_endian-6.8-rc1
> > > > for anyone to pull from now.
> > >
> > > No problem and thank you!
> > >
> > > Bart, can you pull that? Or should I to my tree and then push with other
> > > GPIO patches?
> >
> > Ugh, this is rebased on top of 6.7-rc3...
> >
> > My tree is based on rc1, if I pull it, then it'll be a mess.
>
> But v6.7-rc3 is something that is already in the upstream.
> I don't see how it can be more "mess" with this. Whatever...
>

My for-next branch is based on v6.7-rc1 (as it should IIUC) and if I
now pull Greg's tag, I will be sending rc1-rc3 stuff to Linus Torvalds
in addition to the GPIO changes for v6.8. I bet he will not appreciate
it.

Greg: Is it too late to have this rebased on top of v6.7-rc1 instead?

Bartosz

> > Andy: How badly do you want it in v6.8? Can this wait until after the
> > merge window?
>
> I waited for a cycle already with this...
>
> OTOH GPIO part is not anyhow critical from the semantic point of view.
> Since the main patch is in Greg's tree I'll survive with GPIO stuff
> going next cycle.
>
> --
> With Best Regards,
> Andy Shevchenko
>
>
Greg KH Dec. 18, 2023, 11:08 a.m. UTC | #15
On Mon, Dec 18, 2023 at 11:35:04AM +0100, Bartosz Golaszewski wrote:
> On Fri, Dec 15, 2023 at 4:11 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> >
> > On Fri, Dec 15, 2023 at 03:49:38PM +0100, Greg Kroah-Hartman wrote:
> > > On Thu, Dec 07, 2023 at 04:19:22PM +0200, Andy Shevchenko wrote:
> > > > On Wed, Nov 15, 2023 at 03:21:29PM -0500, Greg Kroah-Hartman wrote:
> > > > > On Wed, Nov 15, 2023 at 03:58:54PM +0100, Bartosz Golaszewski wrote:
> > > > > > On Fri, Nov 3, 2023 at 10:08 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> > > > > > > On Thu, Nov 2, 2023 at 4:33 PM Andy Shevchenko
> > > > > > > <andriy.shevchenko@linux.intel.com> wrote:
> > > > > > > > On Thu, Oct 26, 2023 at 03:27:30PM +0300, Andy Shevchenko wrote:
> > > > > > > > > On Thu, Oct 26, 2023 at 07:25:35AM +0200, Greg Kroah-Hartman wrote:
> > > > > > > > > > On Wed, Oct 25, 2023 at 09:42:57PM +0300, Andy Shevchenko wrote:
> >
> > ...
> >
> > > > > > > > > > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > > > > > > >
> > > > > > > > > Thank you, Greg.
> > > > > > > > >
> > > > > > > > > Bart, would it be still possible to take this into next?
> > > > > > > > > I would like to have at least this patch applied (with the first user)
> > > > > > > > > to allow conversion of others (I have some more users of new API).
> > > > > > > >
> > > > > > > > Okay, seems we missed v6.7 with this, can you then prepare an immutable
> > > > > > > > branch / tag with this, so other maintainers can pull in case it's needed?
> > > > > > > > (I have something against tty already and perhaps something else, let's
> > > > > > > >  see.)
> > > > > > >
> > > > > > > It arrived too late in the cycle, I needed to send my PR earlier this
> > > > > > > time as I was OoO this week.
> > > > > >
> > > > > > Greg, will you take this patch through your tree and provide me with
> > > > > > an immutable tag for this cycle?
> > > > >
> > > > > Sure, let me catch up with patches after I return from Plumbers next
> > > > > week.
> > > >
> > > > Hope Plumbers went well!
> > >
> > > Sorry for the delay, immutable tag can be found at:
> > >       git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git device_is_big_endian-6.8-rc1
> > > for anyone to pull from now.
> >
> > No problem and thank you!
> >
> > Bart, can you pull that? Or should I to my tree and then push with other
> > GPIO patches?
> >
> 
> Ugh, this is rebased on top of 6.7-rc3...
> 
> My tree is based on rc1, if I pull it, then it'll be a mess.

What would make it a "mess"?  It's all upstream already, taking a merge
from a point further in time will work just fine, git is nice :)

thanks,

greg k-h
Greg KH Dec. 18, 2023, 11:18 a.m. UTC | #16
On Mon, Dec 18, 2023 at 12:05:54PM +0100, Bartosz Golaszewski wrote:
> On Mon, Dec 18, 2023 at 11:56 AM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> >
> > On Mon, Dec 18, 2023 at 11:35:04AM +0100, Bartosz Golaszewski wrote:
> > > On Fri, Dec 15, 2023 at 4:11 PM Andy Shevchenko
> > > <andriy.shevchenko@linux.intel.com> wrote:
> > > > On Fri, Dec 15, 2023 at 03:49:38PM +0100, Greg Kroah-Hartman wrote:
> > > > > On Thu, Dec 07, 2023 at 04:19:22PM +0200, Andy Shevchenko wrote:
> > > > > > On Wed, Nov 15, 2023 at 03:21:29PM -0500, Greg Kroah-Hartman wrote:
> > > > > > > On Wed, Nov 15, 2023 at 03:58:54PM +0100, Bartosz Golaszewski wrote:
> > > > > > > > On Fri, Nov 3, 2023 at 10:08 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> > > > > > > > > On Thu, Nov 2, 2023 at 4:33 PM Andy Shevchenko
> > > > > > > > > <andriy.shevchenko@linux.intel.com> wrote:
> > > > > > > > > > On Thu, Oct 26, 2023 at 03:27:30PM +0300, Andy Shevchenko wrote:
> > > > > > > > > > > On Thu, Oct 26, 2023 at 07:25:35AM +0200, Greg Kroah-Hartman wrote:
> > > > > > > > > > > > On Wed, Oct 25, 2023 at 09:42:57PM +0300, Andy Shevchenko wrote:
> >
> > ...
> >
> > > > > > > > > > > > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > > > > > > > > >
> > > > > > > > > > > Thank you, Greg.
> > > > > > > > > > >
> > > > > > > > > > > Bart, would it be still possible to take this into next?
> > > > > > > > > > > I would like to have at least this patch applied (with the first user)
> > > > > > > > > > > to allow conversion of others (I have some more users of new API).
> > > > > > > > > >
> > > > > > > > > > Okay, seems we missed v6.7 with this, can you then prepare an immutable
> > > > > > > > > > branch / tag with this, so other maintainers can pull in case it's needed?
> > > > > > > > > > (I have something against tty already and perhaps something else, let's
> > > > > > > > > >  see.)
> > > > > > > > >
> > > > > > > > > It arrived too late in the cycle, I needed to send my PR earlier this
> > > > > > > > > time as I was OoO this week.
> > > > > > > >
> > > > > > > > Greg, will you take this patch through your tree and provide me with
> > > > > > > > an immutable tag for this cycle?
> > > > > > >
> > > > > > > Sure, let me catch up with patches after I return from Plumbers next
> > > > > > > week.
> > > > > >
> > > > > > Hope Plumbers went well!
> > > > >
> > > > > Sorry for the delay, immutable tag can be found at:
> > > > >       git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git device_is_big_endian-6.8-rc1
> > > > > for anyone to pull from now.
> > > >
> > > > No problem and thank you!
> > > >
> > > > Bart, can you pull that? Or should I to my tree and then push with other
> > > > GPIO patches?
> > >
> > > Ugh, this is rebased on top of 6.7-rc3...
> > >
> > > My tree is based on rc1, if I pull it, then it'll be a mess.
> >
> > But v6.7-rc3 is something that is already in the upstream.
> > I don't see how it can be more "mess" with this. Whatever...
> >
> 
> My for-next branch is based on v6.7-rc1 (as it should IIUC) and if I
> now pull Greg's tag, I will be sending rc1-rc3 stuff to Linus Torvalds
> in addition to the GPIO changes for v6.8. I bet he will not appreciate
> it.

No, you will not be sending him -rc1-rc3 stuff at all, that's not how
git works.

Try it yourself and see.  Git does a "what's the changesets that are
in this pull request and not already in mine" when determining this.
You can see it when doing a 'git request-pull', it will only show you
the diff of what will be sent.

Also look at the 'git merge-base' output, it will show the point where
things will start to be sent, and that will not have all of the -rc1
through -rc3 changes in it.

> Greg: Is it too late to have this rebased on top of v6.7-rc1 instead?

Sorry, but yes.  But don't worry, again, git can handle all of this
easily!  Try it locally and see.  Don't fear the 'fast-forward' :)

thanks,

greg k-h
Bartosz Golaszewski Dec. 18, 2023, 12:38 p.m. UTC | #17
On Mon, Dec 18, 2023 at 12:18 PM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Mon, Dec 18, 2023 at 12:05:54PM +0100, Bartosz Golaszewski wrote:
> > On Mon, Dec 18, 2023 at 11:56 AM Andy Shevchenko
> > <andriy.shevchenko@linux.intel.com> wrote:
> > >
> > > On Mon, Dec 18, 2023 at 11:35:04AM +0100, Bartosz Golaszewski wrote:
> > > > On Fri, Dec 15, 2023 at 4:11 PM Andy Shevchenko
> > > > <andriy.shevchenko@linux.intel.com> wrote:
> > > > > On Fri, Dec 15, 2023 at 03:49:38PM +0100, Greg Kroah-Hartman wrote:
> > > > > > On Thu, Dec 07, 2023 at 04:19:22PM +0200, Andy Shevchenko wrote:
> > > > > > > On Wed, Nov 15, 2023 at 03:21:29PM -0500, Greg Kroah-Hartman wrote:
> > > > > > > > On Wed, Nov 15, 2023 at 03:58:54PM +0100, Bartosz Golaszewski wrote:
> > > > > > > > > On Fri, Nov 3, 2023 at 10:08 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> > > > > > > > > > On Thu, Nov 2, 2023 at 4:33 PM Andy Shevchenko
> > > > > > > > > > <andriy.shevchenko@linux.intel.com> wrote:
> > > > > > > > > > > On Thu, Oct 26, 2023 at 03:27:30PM +0300, Andy Shevchenko wrote:
> > > > > > > > > > > > On Thu, Oct 26, 2023 at 07:25:35AM +0200, Greg Kroah-Hartman wrote:
> > > > > > > > > > > > > On Wed, Oct 25, 2023 at 09:42:57PM +0300, Andy Shevchenko wrote:
> > >
> > > ...
> > >
> > > > > > > > > > > > > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > > > > > > > > > >
> > > > > > > > > > > > Thank you, Greg.
> > > > > > > > > > > >
> > > > > > > > > > > > Bart, would it be still possible to take this into next?
> > > > > > > > > > > > I would like to have at least this patch applied (with the first user)
> > > > > > > > > > > > to allow conversion of others (I have some more users of new API).
> > > > > > > > > > >
> > > > > > > > > > > Okay, seems we missed v6.7 with this, can you then prepare an immutable
> > > > > > > > > > > branch / tag with this, so other maintainers can pull in case it's needed?
> > > > > > > > > > > (I have something against tty already and perhaps something else, let's
> > > > > > > > > > >  see.)
> > > > > > > > > >
> > > > > > > > > > It arrived too late in the cycle, I needed to send my PR earlier this
> > > > > > > > > > time as I was OoO this week.
> > > > > > > > >
> > > > > > > > > Greg, will you take this patch through your tree and provide me with
> > > > > > > > > an immutable tag for this cycle?
> > > > > > > >
> > > > > > > > Sure, let me catch up with patches after I return from Plumbers next
> > > > > > > > week.
> > > > > > >
> > > > > > > Hope Plumbers went well!
> > > > > >
> > > > > > Sorry for the delay, immutable tag can be found at:
> > > > > >       git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git device_is_big_endian-6.8-rc1
> > > > > > for anyone to pull from now.
> > > > >
> > > > > No problem and thank you!
> > > > >
> > > > > Bart, can you pull that? Or should I to my tree and then push with other
> > > > > GPIO patches?
> > > >
> > > > Ugh, this is rebased on top of 6.7-rc3...
> > > >
> > > > My tree is based on rc1, if I pull it, then it'll be a mess.
> > >
> > > But v6.7-rc3 is something that is already in the upstream.
> > > I don't see how it can be more "mess" with this. Whatever...
> > >
> >
> > My for-next branch is based on v6.7-rc1 (as it should IIUC) and if I
> > now pull Greg's tag, I will be sending rc1-rc3 stuff to Linus Torvalds
> > in addition to the GPIO changes for v6.8. I bet he will not appreciate
> > it.
>
> No, you will not be sending him -rc1-rc3 stuff at all, that's not how
> git works.
>
> Try it yourself and see.  Git does a "what's the changesets that are
> in this pull request and not already in mine" when determining this.
> You can see it when doing a 'git request-pull', it will only show you
> the diff of what will be sent.
>
> Also look at the 'git merge-base' output, it will show the point where
> things will start to be sent, and that will not have all of the -rc1
> through -rc3 changes in it.
>
> > Greg: Is it too late to have this rebased on top of v6.7-rc1 instead?
>
> Sorry, but yes.  But don't worry, again, git can handle all of this
> easily!  Try it locally and see.  Don't fear the 'fast-forward' :)
>

Sorry for the noise. I did try it locally and noticed that a bunch of
commits that were merged before rc3 moved "before it" in git log and
figured this is what the PR would look like. However the PR is correct
and I should have generated it before sending the email.

Thanks for a lesson in git.
Bartosz

> thanks,
>
> greg k-h
>
Andy Shevchenko Dec. 18, 2023, 1:40 p.m. UTC | #18
On Mon, Dec 18, 2023 at 01:38:18PM +0100, Bartosz Golaszewski wrote:
> On Mon, Dec 18, 2023 at 12:18 PM Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> > On Mon, Dec 18, 2023 at 12:05:54PM +0100, Bartosz Golaszewski wrote:
> > > On Mon, Dec 18, 2023 at 11:56 AM Andy Shevchenko
> > > <andriy.shevchenko@linux.intel.com> wrote:
> > > > On Mon, Dec 18, 2023 at 11:35:04AM +0100, Bartosz Golaszewski wrote:
> > > > > On Fri, Dec 15, 2023 at 4:11 PM Andy Shevchenko
> > > > > <andriy.shevchenko@linux.intel.com> wrote:

...

> > > > > Ugh, this is rebased on top of 6.7-rc3...
> > > > >
> > > > > My tree is based on rc1, if I pull it, then it'll be a mess.
> > > >
> > > > But v6.7-rc3 is something that is already in the upstream.
> > > > I don't see how it can be more "mess" with this. Whatever...
> > >
> > > My for-next branch is based on v6.7-rc1 (as it should IIUC) and if I
> > > now pull Greg's tag, I will be sending rc1-rc3 stuff to Linus Torvalds
> > > in addition to the GPIO changes for v6.8. I bet he will not appreciate
> > > it.
> >
> > No, you will not be sending him -rc1-rc3 stuff at all, that's not how
> > git works.
> >
> > Try it yourself and see.  Git does a "what's the changesets that are
> > in this pull request and not already in mine" when determining this.
> > You can see it when doing a 'git request-pull', it will only show you
> > the diff of what will be sent.
> >
> > Also look at the 'git merge-base' output, it will show the point where
> > things will start to be sent, and that will not have all of the -rc1
> > through -rc3 changes in it.
> >
> > > Greg: Is it too late to have this rebased on top of v6.7-rc1 instead?
> >
> > Sorry, but yes.  But don't worry, again, git can handle all of this
> > easily!  Try it locally and see.  Don't fear the 'fast-forward' :)
> 
> Sorry for the noise. I did try it locally and noticed that a bunch of
> commits that were merged before rc3 moved "before it" in git log and
> figured this is what the PR would look like. However the PR is correct
> and I should have generated it before sending the email.

Right.

What Linus can rant on is when one rebases his stuff on newer rcX,
the merges on contrary are pretty much okay as long as they are
justified.

> Thanks for a lesson in git.
diff mbox series

Patch

diff --git a/include/linux/property.h b/include/linux/property.h
index 2b8f07fc68a9..d1400a477b0a 100644
--- a/include/linux/property.h
+++ b/include/linux/property.h
@@ -80,12 +80,38 @@  int fwnode_property_match_string(const struct fwnode_handle *fwnode,
 
 bool fwnode_device_is_available(const struct fwnode_handle *fwnode);
 
+static inline bool fwnode_device_is_big_endian(const struct fwnode_handle *fwnode)
+{
+	if (fwnode_property_present(fwnode, "big-endian"))
+		return true;
+	if (IS_ENABLED(CONFIG_CPU_BIG_ENDIAN) &&
+	    fwnode_property_present(fwnode, "native-endian"))
+		return true;
+	return false;
+}
+
 static inline
 bool fwnode_device_is_compatible(const struct fwnode_handle *fwnode, const char *compat)
 {
 	return fwnode_property_match_string(fwnode, "compatible", compat) >= 0;
 }
 
+/**
+ * device_is_big_endian - check if a device has BE registers
+ * @dev: Pointer to the struct device
+ *
+ * Returns: true if the device has a "big-endian" property, or if the kernel
+ * was compiled for BE *and* the device has a "native-endian" property.
+ * Returns false otherwise.
+ *
+ * Callers would nominally use ioread32be/iowrite32be if
+ * device_is_big_endian() == true, or readl/writel otherwise.
+ */
+static inline bool device_is_big_endian(const struct device *dev)
+{
+	return fwnode_device_is_big_endian(dev_fwnode(dev));
+}
+
 /**
  * device_is_compatible - match 'compatible' property of the device with a given string
  * @dev: Pointer to the struct device