linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] misc: eeprom: at24: fix NVMEM name with custom AT24 device name
       [not found] <20201203214703.18258-1-Diego.SantaCruz () spinetix ! com>
@ 2021-06-01 12:15 ` Alexander Fomichev
  2021-06-01 16:23   ` Diego Santa Cruz
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Fomichev @ 2021-06-01 12:15 UTC (permalink / raw)
  To: Diego Santa Cruz, linux-i2c; +Cc: Bartosz Golaszewski, linux

On Thu, Dec 03, 2020 at 09:47:03PM +0000, Diego Santa Cruz wrote:
> When the "label" property is set on the AT24 EEPROM the NVMEM devid is
> set to NVMEM_DEVID_NONE, but it is not effective since there is a
> leftover line setting it back to NVMEM_DEVID_AUTO a few lines after.
> 
> Fixes: 61f764c307f6 ("eeprom: at24: Support custom device names for AT24 EEPROMs")
> Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
> ---
>  drivers/misc/eeprom/at24.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
> index 35fabaf539b7..fbf69148b5ad 100644
> --- a/drivers/misc/eeprom/at24.c
> +++ b/drivers/misc/eeprom/at24.c
> @@ -704,7 +704,6 @@ static int at24_probe(struct i2c_client *client)
>  
>  	nvmem_config.type = NVMEM_TYPE_EEPROM;
>  	nvmem_config.dev = dev;
> -	nvmem_config.id = NVMEM_DEVID_AUTO;
>  	nvmem_config.read_only = !writable;
>  	nvmem_config.root_only = !(flags & AT24_FLAG_IRUGO);
>  	nvmem_config.owner = THIS_MODULE;

This commit (4e302c3b568eaf2aeebba804c07aba5d921a8c9e) makes a regress
on powerpc64 systems. Tested on YADRO VESNIN (POWER8) and SuperMicro/IBM
9006-22P (POWER9) servers.

The error is logged multiple times in dmesg as following fragment:

[    5.164711] CPU: 26 PID: 1532 Comm: systemd-udevd Tainted: G        W         5.12.0-at24-catch+ #10
[    5.164714] Call Trace:
[    5.164715] [c000000052e2f010] [c000000000913610] dump_stack+0xc4/0x114 (unreliable)
[    5.164721] [c000000052e2f060] [c00000000061bb88] sysfs_warn_dup+0x88/0xc0
[    5.164726] [c000000052e2f0e0] [c00000000061c2ac] sysfs_do_create_link_sd+0x17c/0x190
[    5.164730] [c000000052e2f130] [c000000000ac1854] bus_add_device+0x94/0x1d0
[    5.164735] [c000000052e2f1b0] [c000000000abcff8] device_add+0x428/0xb90
[    5.164738] [c000000052e2f2a0] [c000000000dea270] nvmem_register+0x220/0xe00
[    5.164743] [c000000052e2f390] [c000000000deaeac] devm_nvmem_register+0x5c/0xc0
[    5.164747] [c000000052e2f3d0] [c008000016ca0c1c] at24_probe+0x664/0x8d0 [at24]
[    5.164753] [c000000052e2f650] [c000000000cfd404] i2c_device_probe+0x194/0x650
[    5.164757] [c000000052e2f6f0] [c000000000ac357c] really_probe+0x1cc/0x790
[    5.164761] [c000000052e2f790] [c000000000ac3c9c] driver_probe_device+0x15c/0x200
[    5.164766] [c000000052e2f810] [c000000000ac470c] device_driver_attach+0x11c/0x130
[    5.164771] [c000000052e2f850] [c000000000ac4810] __driver_attach+0xf0/0x200
[    5.164775] [c000000052e2f8d0] [c000000000abf998] bus_for_each_dev+0xa8/0x130
[    5.164779] [c000000052e2f930] [c000000000ac2944] driver_attach+0x34/0x50
[    5.164783] [c000000052e2f950] [c000000000ac1e30] bus_add_driver+0x1b0/0x2f0
[    5.164788] [c000000052e2f9e0] [c000000000ac58f4] driver_register+0xb4/0x1c0
[    5.164792] [c000000052e2fa50] [c000000000cfcbc8] i2c_register_driver+0x78/0x120
[    5.164796] [c000000052e2fad0] [c008000016ca11f0] at24_init+0x6c/0x88 [at24]
[    5.164801] [c000000052e2fb30] [c0000000000122c0] do_one_initcall+0x60/0x2c0
[    5.164805] [c000000052e2fc00] [c000000000253bdc] do_init_module+0x7c/0x350
[    5.164809] [c000000052e2fc90] [c000000000257d24] __do_sys_finit_module+0xd4/0x160
[    5.164813] [c000000052e2fdb0] [c00000000002bfb4] system_call_exception+0xf4/0x200
[    5.164817] [c000000052e2fe10] [c00000000000cf70] system_call_vectored_common+0xf0/0x268
[    5.164821] --- interrupt: 3000 at 0x7f35ee3fb4c4
[    5.164823] NIP:  00007f35ee3fb4c4 LR: 0000000000000000 CTR: 0000000000000000
[    5.164825] REGS: c000000052e2fe80 TRAP: 3000   Tainted: G        W          (5.12.0-at24-catch+)
[    5.164828] MSR:  900000000280f033 <SF,HV,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE>  CR: 44222884  XER: 00000000
[    5.164842] IRQMASK: 0
               GPR00: 0000000000000161 00007ffffbf36390 00007f35ee4e7000 0000000000000006
               GPR04: 00007f35ee6ab510 0000000000000000 0000000000000006 0000000000000000
               GPR08: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
               GPR12: 0000000000000000 00007f35ee78e680 0000000020000000 0000000000000000
               GPR16: 0000000000000000 00000c0344781980 00000c0344781a18 00000c0344781948
               GPR20: 0000000000000000 00000c0350142a20 00007ffffbf365f0 00000c03501b4d90
               GPR24: 0000000000000000 00000c0350142a20 0000000000020000 00000c0350139830
               GPR28: 00007f35ee6ab510 0000000000020000 0000000000000000 00000c0350142a20
[    5.164883] NIP [00007f35ee3fb4c4] 0x7f35ee3fb4c4
[    5.164885] LR [0000000000000000] 0x0
[    5.164887] --- interrupt: 3000
[    5.165102] at24: probe of 8-0057 failed with error -17


Reverting the patch solves the issue.


Reported-by: Alexander Fomichev <fomichev.ru@gmail.com>
CC: Bartosz Golaszewski <bgolaszewski@baylibre.com>
CC: linux@yadro.com

-- 
Regards,
  Alexander

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

* RE: [PATCH] misc: eeprom: at24: fix NVMEM name with custom AT24 device name
  2021-06-01 12:15 ` [PATCH] misc: eeprom: at24: fix NVMEM name with custom AT24 device name Alexander Fomichev
@ 2021-06-01 16:23   ` Diego Santa Cruz
  2021-06-02 16:26     ` Alexander Fomichev
  0 siblings, 1 reply; 5+ messages in thread
From: Diego Santa Cruz @ 2021-06-01 16:23 UTC (permalink / raw)
  To: Alexander Fomichev, linux-i2c; +Cc: Bartosz Golaszewski, linux

> -----Original Message-----
> From: Alexander Fomichev <fomichev.ru@gmail.com>
> Sent: 01 June 2021 14:16
> To: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>; linux-
> i2c@vger.kernel.org
> Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>; linux@yadro.com
> Subject: Re: [PATCH] misc: eeprom: at24: fix NVMEM name with custom
> AT24 device name
> 
> On Thu, Dec 03, 2020 at 09:47:03PM +0000, Diego Santa Cruz wrote:
> > When the "label" property is set on the AT24 EEPROM the NVMEM devid is
> > set to NVMEM_DEVID_NONE, but it is not effective since there is a
> > leftover line setting it back to NVMEM_DEVID_AUTO a few lines after.
> >
> > Fixes: 61f764c307f6 ("eeprom: at24: Support custom device names for AT24
> EEPROMs")
> > Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
> > ---
> >  drivers/misc/eeprom/at24.c | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
> > index 35fabaf539b7..fbf69148b5ad 100644
> > --- a/drivers/misc/eeprom/at24.c
> > +++ b/drivers/misc/eeprom/at24.c
> > @@ -704,7 +704,6 @@ static int at24_probe(struct i2c_client *client)
> >
> >  	nvmem_config.type = NVMEM_TYPE_EEPROM;
> >  	nvmem_config.dev = dev;
> > -	nvmem_config.id = NVMEM_DEVID_AUTO;
> >  	nvmem_config.read_only = !writable;
> >  	nvmem_config.root_only = !(flags & AT24_FLAG_IRUGO);
> >  	nvmem_config.owner = THIS_MODULE;
> 
> This commit (4e302c3b568eaf2aeebba804c07aba5d921a8c9e) makes a
> regress
> on powerpc64 systems. Tested on YADRO VESNIN (POWER8) and
> SuperMicro/IBM
> 9006-22P (POWER9) servers.
> 

That commit is only making the previous commit 61f764c307f6 ("eeprom: at24: Support custom device names for AT24 EEPROMs") take its intended effect in full.
And if I get 61f764c307f6 correctly it makes the name from the "label" property and sets the id to NVMEM_DEVID_NONE, and commit 4e302c3b568e just removes the leftover override to NVMEM_DEVID_AUTO so that 61f764c307f6 does what was intended.

The -17 is actually EEXIST, so probably the name is already being used by another device.
Although reverting 4e302c3b568e fixes the issue, it is probably not the correct solution. At a minimum the line that sets the id to NVMEM_DEVID_NONE would have to be removed and the comments from 61f764c307f6 adjusted to reflect reality.

I have no powerpc64 systems nor any knowledge to find the real issue, although I expect a better solution can be found. 

> The error is logged multiple times in dmesg as following fragment:
> 
> [    5.164711] CPU: 26 PID: 1532 Comm: systemd-udevd Tainted: G        W
> 5.12.0-at24-catch+ #10
> [    5.164714] Call Trace:
> [    5.164715] [c000000052e2f010] [c000000000913610]
> dump_stack+0xc4/0x114 (unreliable)
> [    5.164721] [c000000052e2f060] [c00000000061bb88]
> sysfs_warn_dup+0x88/0xc0
> [    5.164726] [c000000052e2f0e0] [c00000000061c2ac]
> sysfs_do_create_link_sd+0x17c/0x190
> [    5.164730] [c000000052e2f130] [c000000000ac1854]
> bus_add_device+0x94/0x1d0
> [    5.164735] [c000000052e2f1b0] [c000000000abcff8]
> device_add+0x428/0xb90
> [    5.164738] [c000000052e2f2a0] [c000000000dea270]
> nvmem_register+0x220/0xe00
> [    5.164743] [c000000052e2f390] [c000000000deaeac]
> devm_nvmem_register+0x5c/0xc0
> [    5.164747] [c000000052e2f3d0] [c008000016ca0c1c]
> at24_probe+0x664/0x8d0 [at24]
> [    5.164753] [c000000052e2f650] [c000000000cfd404]
> i2c_device_probe+0x194/0x650
> [    5.164757] [c000000052e2f6f0] [c000000000ac357c]
> really_probe+0x1cc/0x790
> [    5.164761] [c000000052e2f790] [c000000000ac3c9c]
> driver_probe_device+0x15c/0x200
> [    5.164766] [c000000052e2f810] [c000000000ac470c]
> device_driver_attach+0x11c/0x130
> [    5.164771] [c000000052e2f850] [c000000000ac4810]
> __driver_attach+0xf0/0x200
> [    5.164775] [c000000052e2f8d0] [c000000000abf998]
> bus_for_each_dev+0xa8/0x130
> [    5.164779] [c000000052e2f930] [c000000000ac2944]
> driver_attach+0x34/0x50
> [    5.164783] [c000000052e2f950] [c000000000ac1e30]
> bus_add_driver+0x1b0/0x2f0
> [    5.164788] [c000000052e2f9e0] [c000000000ac58f4]
> driver_register+0xb4/0x1c0
> [    5.164792] [c000000052e2fa50] [c000000000cfcbc8]
> i2c_register_driver+0x78/0x120
> [    5.164796] [c000000052e2fad0] [c008000016ca11f0] at24_init+0x6c/0x88
> [at24]
> [    5.164801] [c000000052e2fb30] [c0000000000122c0]
> do_one_initcall+0x60/0x2c0
> [    5.164805] [c000000052e2fc00] [c000000000253bdc]
> do_init_module+0x7c/0x350
> [    5.164809] [c000000052e2fc90] [c000000000257d24]
> __do_sys_finit_module+0xd4/0x160
> [    5.164813] [c000000052e2fdb0] [c00000000002bfb4]
> system_call_exception+0xf4/0x200
> [    5.164817] [c000000052e2fe10] [c00000000000cf70]
> system_call_vectored_common+0xf0/0x268
> [    5.164821] --- interrupt: 3000 at 0x7f35ee3fb4c4
> [    5.164823] NIP:  00007f35ee3fb4c4 LR: 0000000000000000 CTR:
> 0000000000000000
> [    5.164825] REGS: c000000052e2fe80 TRAP: 3000   Tainted: G        W
> (5.12.0-at24-catch+)
> [    5.164828] MSR:  900000000280f033
> <SF,HV,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE>  CR: 44222884  XER: 00000000
> [    5.164842] IRQMASK: 0
>                GPR00: 0000000000000161 00007ffffbf36390 00007f35ee4e7000
> 0000000000000006
>                GPR04: 00007f35ee6ab510 0000000000000000 0000000000000006
> 0000000000000000
>                GPR08: 0000000000000000 0000000000000000 0000000000000000
> 0000000000000000
>                GPR12: 0000000000000000 00007f35ee78e680 0000000020000000
> 0000000000000000
>                GPR16: 0000000000000000 00000c0344781980 00000c0344781a18
> 00000c0344781948
>                GPR20: 0000000000000000 00000c0350142a20 00007ffffbf365f0
> 00000c03501b4d90
>                GPR24: 0000000000000000 00000c0350142a20 0000000000020000
> 00000c0350139830
>                GPR28: 00007f35ee6ab510 0000000000020000 0000000000000000
> 00000c0350142a20
> [    5.164883] NIP [00007f35ee3fb4c4] 0x7f35ee3fb4c4
> [    5.164885] LR [0000000000000000] 0x0
> [    5.164887] --- interrupt: 3000
> [    5.165102] at24: probe of 8-0057 failed with error -17
> 
> 
> Reverting the patch solves the issue.
> 
> 
> Reported-by: Alexander Fomichev <fomichev.ru@gmail.com>
> CC: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> CC: linux@yadro.com
> 
> --
> Regards,
>   Alexander
-- 
Diego Santa Cruz, PhD
Technology Architect
spinetix.com



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

* Re: [PATCH] misc: eeprom: at24: fix NVMEM name with custom AT24 device name
  2021-06-01 16:23   ` Diego Santa Cruz
@ 2021-06-02 16:26     ` Alexander Fomichev
  0 siblings, 0 replies; 5+ messages in thread
From: Alexander Fomichev @ 2021-06-02 16:26 UTC (permalink / raw)
  To: Diego Santa Cruz; +Cc: linux-i2c, Bartosz Golaszewski, linux

On Tue, Jun 01, 2021 at 04:23:44PM +0000, Diego Santa Cruz wrote:
> > -----Original Message-----
> > From: Alexander Fomichev <fomichev.ru@gmail.com>
> > Sent: 01 June 2021 14:16
> > To: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>; linux-
> > i2c@vger.kernel.org
> > Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>; linux@yadro.com
> > Subject: Re: [PATCH] misc: eeprom: at24: fix NVMEM name with custom
> > AT24 device name
> > 
> > On Thu, Dec 03, 2020 at 09:47:03PM +0000, Diego Santa Cruz wrote:
> > > When the "label" property is set on the AT24 EEPROM the NVMEM devid is
> > > set to NVMEM_DEVID_NONE, but it is not effective since there is a
> > > leftover line setting it back to NVMEM_DEVID_AUTO a few lines after.
> > >
> > > Fixes: 61f764c307f6 ("eeprom: at24: Support custom device names for AT24
> > EEPROMs")
> > > Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
> > > ---
> > >  drivers/misc/eeprom/at24.c | 1 -
> > >  1 file changed, 1 deletion(-)
> > >
> > > diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
> > > index 35fabaf539b7..fbf69148b5ad 100644
> > > --- a/drivers/misc/eeprom/at24.c
> > > +++ b/drivers/misc/eeprom/at24.c
> > > @@ -704,7 +704,6 @@ static int at24_probe(struct i2c_client *client)
> > >
> > >  	nvmem_config.type = NVMEM_TYPE_EEPROM;
> > >  	nvmem_config.dev = dev;
> > > -	nvmem_config.id = NVMEM_DEVID_AUTO;
> > >  	nvmem_config.read_only = !writable;
> > >  	nvmem_config.root_only = !(flags & AT24_FLAG_IRUGO);
> > >  	nvmem_config.owner = THIS_MODULE;
> > 
> > This commit (4e302c3b568eaf2aeebba804c07aba5d921a8c9e) makes a
> > regress
> > on powerpc64 systems. Tested on YADRO VESNIN (POWER8) and
> > SuperMicro/IBM
> > 9006-22P (POWER9) servers.
> > 
> 
> That commit is only making the previous commit 61f764c307f6 ("eeprom: at24: Support custom device names for AT24 EEPROMs") take its intended effect in full.
> And if I get 61f764c307f6 correctly it makes the name from the "label" property and sets the id to NVMEM_DEVID_NONE, and commit 4e302c3b568e just removes the leftover override to NVMEM_DEVID_AUTO so that 61f764c307f6 does what was intended.
> 
> The -17 is actually EEXIST, so probably the name is already being used by another device.
> Although reverting 4e302c3b568e fixes the issue, it is probably not the correct solution. At a minimum the line that sets the id to NVMEM_DEVID_NONE would have to be removed and the comments from 61f764c307f6 adjusted to reflect reality.
> 
> I have no powerpc64 systems nor any knowledge to find the real issue, although I expect a better solution can be found. 
> 
> > The error is logged multiple times in dmesg as following fragment:
> > 
> > [    5.164711] CPU: 26 PID: 1532 Comm: systemd-udevd Tainted: G        W
> > 5.12.0-at24-catch+ #10
> > [    5.164714] Call Trace:
> > [    5.164715] [c000000052e2f010] [c000000000913610]
> > dump_stack+0xc4/0x114 (unreliable)
> > [    5.164721] [c000000052e2f060] [c00000000061bb88]
> > sysfs_warn_dup+0x88/0xc0
> > [    5.164726] [c000000052e2f0e0] [c00000000061c2ac]
> > sysfs_do_create_link_sd+0x17c/0x190
> > [    5.164730] [c000000052e2f130] [c000000000ac1854]
> > bus_add_device+0x94/0x1d0
> > [    5.164735] [c000000052e2f1b0] [c000000000abcff8]
> > device_add+0x428/0xb90
> > [    5.164738] [c000000052e2f2a0] [c000000000dea270]
> > nvmem_register+0x220/0xe00
> > [    5.164743] [c000000052e2f390] [c000000000deaeac]
> > devm_nvmem_register+0x5c/0xc0
> > [    5.164747] [c000000052e2f3d0] [c008000016ca0c1c]
> > at24_probe+0x664/0x8d0 [at24]
> > [    5.164753] [c000000052e2f650] [c000000000cfd404]
> > i2c_device_probe+0x194/0x650
> > [    5.164757] [c000000052e2f6f0] [c000000000ac357c]
> > really_probe+0x1cc/0x790
> > [    5.164761] [c000000052e2f790] [c000000000ac3c9c]
> > driver_probe_device+0x15c/0x200
> > [    5.164766] [c000000052e2f810] [c000000000ac470c]
> > device_driver_attach+0x11c/0x130
> > [    5.164771] [c000000052e2f850] [c000000000ac4810]
> > __driver_attach+0xf0/0x200
> > [    5.164775] [c000000052e2f8d0] [c000000000abf998]
> > bus_for_each_dev+0xa8/0x130
> > [    5.164779] [c000000052e2f930] [c000000000ac2944]
> > driver_attach+0x34/0x50
> > [    5.164783] [c000000052e2f950] [c000000000ac1e30]
> > bus_add_driver+0x1b0/0x2f0
> > [    5.164788] [c000000052e2f9e0] [c000000000ac58f4]
> > driver_register+0xb4/0x1c0
> > [    5.164792] [c000000052e2fa50] [c000000000cfcbc8]
> > i2c_register_driver+0x78/0x120
> > [    5.164796] [c000000052e2fad0] [c008000016ca11f0] at24_init+0x6c/0x88
> > [at24]
> > [    5.164801] [c000000052e2fb30] [c0000000000122c0]
> > do_one_initcall+0x60/0x2c0
> > [    5.164805] [c000000052e2fc00] [c000000000253bdc]
> > do_init_module+0x7c/0x350
> > [    5.164809] [c000000052e2fc90] [c000000000257d24]
> > __do_sys_finit_module+0xd4/0x160
> > [    5.164813] [c000000052e2fdb0] [c00000000002bfb4]
> > system_call_exception+0xf4/0x200
> > [    5.164817] [c000000052e2fe10] [c00000000000cf70]
> > system_call_vectored_common+0xf0/0x268
> > [    5.164821] --- interrupt: 3000 at 0x7f35ee3fb4c4
> > [    5.164823] NIP:  00007f35ee3fb4c4 LR: 0000000000000000 CTR:
> > 0000000000000000
> > [    5.164825] REGS: c000000052e2fe80 TRAP: 3000   Tainted: G        W
> > (5.12.0-at24-catch+)
> > [    5.164828] MSR:  900000000280f033
> > <SF,HV,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE>  CR: 44222884  XER: 00000000
> > [    5.164842] IRQMASK: 0
> >                GPR00: 0000000000000161 00007ffffbf36390 00007f35ee4e7000
> > 0000000000000006
> >                GPR04: 00007f35ee6ab510 0000000000000000 0000000000000006
> > 0000000000000000
> >                GPR08: 0000000000000000 0000000000000000 0000000000000000
> > 0000000000000000
> >                GPR12: 0000000000000000 00007f35ee78e680 0000000020000000
> > 0000000000000000
> >                GPR16: 0000000000000000 00000c0344781980 00000c0344781a18
> > 00000c0344781948
> >                GPR20: 0000000000000000 00000c0350142a20 00007ffffbf365f0
> > 00000c03501b4d90
> >                GPR24: 0000000000000000 00000c0350142a20 0000000000020000
> > 00000c0350139830
> >                GPR28: 00007f35ee6ab510 0000000000020000 0000000000000000
> > 00000c0350142a20
> > [    5.164883] NIP [00007f35ee3fb4c4] 0x7f35ee3fb4c4
> > [    5.164885] LR [0000000000000000] 0x0
> > [    5.164887] --- interrupt: 3000
> > [    5.165102] at24: probe of 8-0057 failed with error -17
> > 
> > 
> > Reverting the patch solves the issue.
> > 
> > 
> > Reported-by: Alexander Fomichev <fomichev.ru@gmail.com>
> > CC: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> > CC: linux@yadro.com
> > 
> 

That's right. More digging showed that commit 61f764c307f6 causes the
described problem, not 4e302c3b568e.

I'll report it to appropriate thread.

-- 
Regards,
  Alexander

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

* Re: [PATCH] misc: eeprom: at24: fix NVMEM name with custom AT24 device name
  2020-12-03 21:47 Diego Santa Cruz
@ 2020-12-04  9:45 ` Bartosz Golaszewski
  0 siblings, 0 replies; 5+ messages in thread
From: Bartosz Golaszewski @ 2020-12-04  9:45 UTC (permalink / raw)
  To: Diego Santa Cruz; +Cc: linux-i2c

On Thu, Dec 3, 2020 at 10:47 PM Diego Santa Cruz
<Diego.SantaCruz@spinetix.com> wrote:
>
> When the "label" property is set on the AT24 EEPROM the NVMEM devid is
> set to NVMEM_DEVID_NONE, but it is not effective since there is a
> leftover line setting it back to NVMEM_DEVID_AUTO a few lines after.
>
> Fixes: 61f764c307f6 ("eeprom: at24: Support custom device names for AT24 EEPROMs")
> Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
> ---
>  drivers/misc/eeprom/at24.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
> index 35fabaf539b7..fbf69148b5ad 100644
> --- a/drivers/misc/eeprom/at24.c
> +++ b/drivers/misc/eeprom/at24.c
> @@ -704,7 +704,6 @@ static int at24_probe(struct i2c_client *client)
>
>         nvmem_config.type = NVMEM_TYPE_EEPROM;
>         nvmem_config.dev = dev;
> -       nvmem_config.id = NVMEM_DEVID_AUTO;
>         nvmem_config.read_only = !writable;
>         nvmem_config.root_only = !(flags & AT24_FLAG_IRUGO);
>         nvmem_config.owner = THIS_MODULE;
> --
> 2.18.4
>

Goog catch, thanks. Applied to fixes.

Bartosz

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

* [PATCH] misc: eeprom: at24: fix NVMEM name with custom AT24 device name
@ 2020-12-03 21:47 Diego Santa Cruz
  2020-12-04  9:45 ` Bartosz Golaszewski
  0 siblings, 1 reply; 5+ messages in thread
From: Diego Santa Cruz @ 2020-12-03 21:47 UTC (permalink / raw)
  To: bgolaszewski; +Cc: linux-i2c, Diego Santa Cruz

When the "label" property is set on the AT24 EEPROM the NVMEM devid is
set to NVMEM_DEVID_NONE, but it is not effective since there is a
leftover line setting it back to NVMEM_DEVID_AUTO a few lines after.

Fixes: 61f764c307f6 ("eeprom: at24: Support custom device names for AT24 EEPROMs")
Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
---
 drivers/misc/eeprom/at24.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
index 35fabaf539b7..fbf69148b5ad 100644
--- a/drivers/misc/eeprom/at24.c
+++ b/drivers/misc/eeprom/at24.c
@@ -704,7 +704,6 @@ static int at24_probe(struct i2c_client *client)
 
 	nvmem_config.type = NVMEM_TYPE_EEPROM;
 	nvmem_config.dev = dev;
-	nvmem_config.id = NVMEM_DEVID_AUTO;
 	nvmem_config.read_only = !writable;
 	nvmem_config.root_only = !(flags & AT24_FLAG_IRUGO);
 	nvmem_config.owner = THIS_MODULE;
-- 
2.18.4


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

end of thread, other threads:[~2021-06-02 16:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20201203214703.18258-1-Diego.SantaCruz () spinetix ! com>
2021-06-01 12:15 ` [PATCH] misc: eeprom: at24: fix NVMEM name with custom AT24 device name Alexander Fomichev
2021-06-01 16:23   ` Diego Santa Cruz
2021-06-02 16:26     ` Alexander Fomichev
2020-12-03 21:47 Diego Santa Cruz
2020-12-04  9:45 ` Bartosz Golaszewski

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