linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] i2c: of: Populate fwnode in of_i2c_get_board_info()
@ 2019-11-15  4:50 Saravana Kannan
  2019-11-15  5:32 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 6+ messages in thread
From: Saravana Kannan @ 2019-11-15  4:50 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Saravana Kannan, Greg Kroah-Hartman, kernel-team, linux-i2c,
	linux-kernel

This allows the of_devlink feature to work across i2c devices too. This
avoid unnecessary probe deferrals of i2c devices, defers consumers of
i2c devices till the i2c devices probe, and allows i2c drivers to
implement sync_state() callbacks.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Saravana Kannan <saravanak@google.com>
---
The of_devlink feature is present in driver-core-next branch. It started
off with [1] but it has been improving since then.

[1] -- https://lore.kernel.org/linux-acpi/20190904211126.47518-1-saravanak@google.com/

 drivers/i2c/i2c-core-of.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/i2c/i2c-core-of.c b/drivers/i2c/i2c-core-of.c
index 6f632d543fcc..4e913c890a7b 100644
--- a/drivers/i2c/i2c-core-of.c
+++ b/drivers/i2c/i2c-core-of.c
@@ -50,6 +50,7 @@ int of_i2c_get_board_info(struct device *dev, struct device_node *node,
 
 	info->addr = addr;
 	info->of_node = node;
+	info->fwnode = of_fwnode_handle(node);
 
 	if (of_property_read_bool(node, "host-notify"))
 		info->flags |= I2C_CLIENT_HOST_NOTIFY;
-- 
2.24.0.432.g9d3f5f5b63-goog


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v1] i2c: of: Populate fwnode in of_i2c_get_board_info()
  2019-11-15  4:50 [PATCH v1] i2c: of: Populate fwnode in of_i2c_get_board_info() Saravana Kannan
@ 2019-11-15  5:32 ` Greg Kroah-Hartman
  2019-11-15  9:10   ` Wolfram Sang
  0 siblings, 1 reply; 6+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-15  5:32 UTC (permalink / raw)
  To: Saravana Kannan; +Cc: Wolfram Sang, kernel-team, linux-i2c, linux-kernel

On Thu, Nov 14, 2019 at 08:50:48PM -0800, Saravana Kannan wrote:
> This allows the of_devlink feature to work across i2c devices too. This
> avoid unnecessary probe deferrals of i2c devices, defers consumers of
> i2c devices till the i2c devices probe, and allows i2c drivers to
> implement sync_state() callbacks.
> 
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Saravana Kannan <saravanak@google.com>
> ---
> The of_devlink feature is present in driver-core-next branch. It started
> off with [1] but it has been improving since then.
> 
> [1] -- https://lore.kernel.org/linux-acpi/20190904211126.47518-1-saravanak@google.com/
> 
>  drivers/i2c/i2c-core-of.c | 1 +
>  1 file changed, 1 insertion(+)

Wolfram, I can take this through my tree now if you have no objections
to this.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1] i2c: of: Populate fwnode in of_i2c_get_board_info()
  2019-11-15  5:32 ` Greg Kroah-Hartman
@ 2019-11-15  9:10   ` Wolfram Sang
  2019-11-15 22:15     ` Saravana Kannan
  2019-11-16 12:57     ` Greg Kroah-Hartman
  0 siblings, 2 replies; 6+ messages in thread
From: Wolfram Sang @ 2019-11-15  9:10 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Saravana Kannan, kernel-team, linux-i2c, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1008 bytes --]

On Fri, Nov 15, 2019 at 01:32:01PM +0800, Greg Kroah-Hartman wrote:
> On Thu, Nov 14, 2019 at 08:50:48PM -0800, Saravana Kannan wrote:
> > This allows the of_devlink feature to work across i2c devices too. This
> > avoid unnecessary probe deferrals of i2c devices, defers consumers of
> > i2c devices till the i2c devices probe, and allows i2c drivers to
> > implement sync_state() callbacks.
> > 
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Signed-off-by: Saravana Kannan <saravanak@google.com>
> > ---
> > The of_devlink feature is present in driver-core-next branch. It started
> > off with [1] but it has been improving since then.
> > 
> > [1] -- https://lore.kernel.org/linux-acpi/20190904211126.47518-1-saravanak@google.com/
> > 
> >  drivers/i2c/i2c-core-of.c | 1 +
> >  1 file changed, 1 insertion(+)
> 
> Wolfram, I can take this through my tree now if you have no objections
> to this.

What would be the advantage? I can also apply it today if you ack it.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1] i2c: of: Populate fwnode in of_i2c_get_board_info()
  2019-11-15  9:10   ` Wolfram Sang
@ 2019-11-15 22:15     ` Saravana Kannan
  2019-11-16 12:57     ` Greg Kroah-Hartman
  1 sibling, 0 replies; 6+ messages in thread
From: Saravana Kannan @ 2019-11-15 22:15 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Greg Kroah-Hartman, Android Kernel Team, linux-i2c, LKML

On Fri, Nov 15, 2019 at 1:10 AM Wolfram Sang <wsa@the-dreams.de> wrote:
>
> On Fri, Nov 15, 2019 at 01:32:01PM +0800, Greg Kroah-Hartman wrote:
> > On Thu, Nov 14, 2019 at 08:50:48PM -0800, Saravana Kannan wrote:
> > > This allows the of_devlink feature to work across i2c devices too. This
> > > avoid unnecessary probe deferrals of i2c devices, defers consumers of
> > > i2c devices till the i2c devices probe, and allows i2c drivers to
> > > implement sync_state() callbacks.
> > >
> > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > Signed-off-by: Saravana Kannan <saravanak@google.com>
> > > ---
> > > The of_devlink feature is present in driver-core-next branch. It started
> > > off with [1] but it has been improving since then.
> > >
> > > [1] -- https://lore.kernel.org/linux-acpi/20190904211126.47518-1-saravanak@google.com/
> > >
> > >  drivers/i2c/i2c-core-of.c | 1 +
> > >  1 file changed, 1 insertion(+)
> >
> > Wolfram, I can take this through my tree now if you have no objections
> > to this.
>
> What would be the advantage?

Of the patch or of him picking it up?

Advantage of the patch is in the commit text. Details of of_devlink
are also provided in the link I gave earlier.

Advantage of Greg picking it up: This patch will get tested/seen with
the set of changes (of_devlink) with which it'll have the biggest
functional impact.

-Saravana

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1] i2c: of: Populate fwnode in of_i2c_get_board_info()
  2019-11-15  9:10   ` Wolfram Sang
  2019-11-15 22:15     ` Saravana Kannan
@ 2019-11-16 12:57     ` Greg Kroah-Hartman
  2019-11-16 18:19       ` Wolfram Sang
  1 sibling, 1 reply; 6+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-16 12:57 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Saravana Kannan, kernel-team, linux-i2c, linux-kernel

On Fri, Nov 15, 2019 at 10:10:36AM +0100, Wolfram Sang wrote:
> On Fri, Nov 15, 2019 at 01:32:01PM +0800, Greg Kroah-Hartman wrote:
> > On Thu, Nov 14, 2019 at 08:50:48PM -0800, Saravana Kannan wrote:
> > > This allows the of_devlink feature to work across i2c devices too. This
> > > avoid unnecessary probe deferrals of i2c devices, defers consumers of
> > > i2c devices till the i2c devices probe, and allows i2c drivers to
> > > implement sync_state() callbacks.
> > > 
> > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > Signed-off-by: Saravana Kannan <saravanak@google.com>
> > > ---
> > > The of_devlink feature is present in driver-core-next branch. It started
> > > off with [1] but it has been improving since then.
> > > 
> > > [1] -- https://lore.kernel.org/linux-acpi/20190904211126.47518-1-saravanak@google.com/
> > > 
> > >  drivers/i2c/i2c-core-of.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > 
> > Wolfram, I can take this through my tree now if you have no objections
> > to this.
> 
> What would be the advantage? I can also apply it today if you ack it.

I think it will not build in your tree if you apply it now as this is a
new api :)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1] i2c: of: Populate fwnode in of_i2c_get_board_info()
  2019-11-16 12:57     ` Greg Kroah-Hartman
@ 2019-11-16 18:19       ` Wolfram Sang
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2019-11-16 18:19 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Saravana Kannan, kernel-team, linux-i2c, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 278 bytes --]


> > What would be the advantage? I can also apply it today if you ack it.
> 
> I think it will not build in your tree if you apply it now as this is a
> new api :)

That's a convincing argument :) Have fun with the patch!

Acked-by: Wolfram Sang <wsa@the-dreams.de>


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-11-16 18:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-15  4:50 [PATCH v1] i2c: of: Populate fwnode in of_i2c_get_board_info() Saravana Kannan
2019-11-15  5:32 ` Greg Kroah-Hartman
2019-11-15  9:10   ` Wolfram Sang
2019-11-15 22:15     ` Saravana Kannan
2019-11-16 12:57     ` Greg Kroah-Hartman
2019-11-16 18:19       ` Wolfram Sang

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).