Linux-i2c Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] i2c: core: do not use logical device when creating irq domain
@ 2020-07-01  8:23 Wolfram Sang
  2020-07-24 19:47 ` Wolfram Sang
  2020-07-27 20:32 ` Wolfram Sang
  0 siblings, 2 replies; 4+ messages in thread
From: Wolfram Sang @ 2020-07-01  8:23 UTC (permalink / raw)
  To: linux-i2c
  Cc: linux-renesas-soc, Alain Volmat, Benjamin Tissoires, Wolfram Sang

Let's rather use its physical parent device to give proper namings and
connections in debugfs.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---

This turns the name from "unknown-1" to ":soc:i2c@e6540000" in debugfs
for my use case.

@Benjamin: I am not aware of any other side effects or regression
possibilites. Do you see any?

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

diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index dc43242a85ba..69217d2193da 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -1227,7 +1227,7 @@ static int i2c_setup_host_notify_irq_domain(struct i2c_adapter *adap)
 	if (!i2c_check_functionality(adap, I2C_FUNC_SMBUS_HOST_NOTIFY))
 		return 0;
 
-	domain = irq_domain_create_linear(adap->dev.fwnode,
+	domain = irq_domain_create_linear(adap->dev.parent->fwnode,
 					  I2C_ADDR_7BITS_COUNT,
 					  &i2c_host_notify_irq_ops, adap);
 	if (!domain)
-- 
2.20.1


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

* Re: [PATCH] i2c: core: do not use logical device when creating irq domain
  2020-07-01  8:23 [PATCH] i2c: core: do not use logical device when creating irq domain Wolfram Sang
@ 2020-07-24 19:47 ` Wolfram Sang
  2020-07-27 10:04   ` Benjamin Tissoires
  2020-07-27 20:32 ` Wolfram Sang
  1 sibling, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2020-07-24 19:47 UTC (permalink / raw)
  To: linux-i2c, Benjamin Tissoires; +Cc: linux-renesas-soc, Alain Volmat


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

On Wed, Jul 01, 2020 at 10:23:18AM +0200, Wolfram Sang wrote:
> Let's rather use its physical parent device to give proper namings and
> connections in debugfs.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
> 
> This turns the name from "unknown-1" to ":soc:i2c@e6540000" in debugfs
> for my use case.
> 
> @Benjamin: I am not aware of any other side effects or regression
> possibilites. Do you see any?

Last call for opinions before I apply it ;)

> 
>  drivers/i2c/i2c-core-base.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
> index dc43242a85ba..69217d2193da 100644
> --- a/drivers/i2c/i2c-core-base.c
> +++ b/drivers/i2c/i2c-core-base.c
> @@ -1227,7 +1227,7 @@ static int i2c_setup_host_notify_irq_domain(struct i2c_adapter *adap)
>  	if (!i2c_check_functionality(adap, I2C_FUNC_SMBUS_HOST_NOTIFY))
>  		return 0;
>  
> -	domain = irq_domain_create_linear(adap->dev.fwnode,
> +	domain = irq_domain_create_linear(adap->dev.parent->fwnode,
>  					  I2C_ADDR_7BITS_COUNT,
>  					  &i2c_host_notify_irq_ops, adap);
>  	if (!domain)
> -- 
> 2.20.1
> 

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

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

* Re: [PATCH] i2c: core: do not use logical device when creating irq domain
  2020-07-24 19:47 ` Wolfram Sang
@ 2020-07-27 10:04   ` Benjamin Tissoires
  0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Tissoires @ 2020-07-27 10:04 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Linux I2C, linux-renesas-soc, Alain Volmat

On Fri, Jul 24, 2020 at 9:54 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
>
> On Wed, Jul 01, 2020 at 10:23:18AM +0200, Wolfram Sang wrote:
> > Let's rather use its physical parent device to give proper namings and
> > connections in debugfs.
> >
> > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > ---
> >
> > This turns the name from "unknown-1" to ":soc:i2c@e6540000" in debugfs
> > for my use case.
> >
> > @Benjamin: I am not aware of any other side effects or regression
> > possibilites. Do you see any?
>
> Last call for opinions before I apply it ;)

Sorry for the late reply.

AFAICT, there should not be any side effects. This is internal API and
I don't think the callers need to walk through the tree anywhere. So
if that gives a vetter debugfs, why not.

Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Cheers,
Benjamin

>
> >
> >  drivers/i2c/i2c-core-base.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
> > index dc43242a85ba..69217d2193da 100644
> > --- a/drivers/i2c/i2c-core-base.c
> > +++ b/drivers/i2c/i2c-core-base.c
> > @@ -1227,7 +1227,7 @@ static int i2c_setup_host_notify_irq_domain(struct i2c_adapter *adap)
> >       if (!i2c_check_functionality(adap, I2C_FUNC_SMBUS_HOST_NOTIFY))
> >               return 0;
> >
> > -     domain = irq_domain_create_linear(adap->dev.fwnode,
> > +     domain = irq_domain_create_linear(adap->dev.parent->fwnode,
> >                                         I2C_ADDR_7BITS_COUNT,
> >                                         &i2c_host_notify_irq_ops, adap);
> >       if (!domain)
> > --
> > 2.20.1
> >


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

* Re: [PATCH] i2c: core: do not use logical device when creating irq domain
  2020-07-01  8:23 [PATCH] i2c: core: do not use logical device when creating irq domain Wolfram Sang
  2020-07-24 19:47 ` Wolfram Sang
@ 2020-07-27 20:32 ` Wolfram Sang
  1 sibling, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2020-07-27 20:32 UTC (permalink / raw)
  To: linux-i2c; +Cc: linux-renesas-soc, Alain Volmat, Benjamin Tissoires


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

On Wed, Jul 01, 2020 at 10:23:18AM +0200, Wolfram Sang wrote:
> Let's rather use its physical parent device to give proper namings and
> connections in debugfs.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Applied to for-next, thanks!


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

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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-01  8:23 [PATCH] i2c: core: do not use logical device when creating irq domain Wolfram Sang
2020-07-24 19:47 ` Wolfram Sang
2020-07-27 10:04   ` Benjamin Tissoires
2020-07-27 20:32 ` Wolfram Sang

Linux-i2c Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-i2c/0 linux-i2c/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-i2c linux-i2c/ https://lore.kernel.org/linux-i2c \
		linux-i2c@vger.kernel.org
	public-inbox-index linux-i2c

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-i2c


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git