mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: GregKH <greg@kroah.com>,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	Maxime Ripard <maxime.ripard@free-electrons.com>,
	Wolfram Sang <wsa@the-dreams.de>,
	broonie@kernel.org, vz@mleia.com, fd@ti.com,
	LKML <linux-kernel@vger.kernel.org>,
	Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Subject: Re: [PATCH 3/7] eeprom: at24: extend driver to plug into the NVMEM framework
Date: Fri, 12 Feb 2016 10:16:12 +0100	[thread overview]
Message-ID: <20160212091612.GB9276@lunn.ch> (raw)
In-Reply-To: <CAMpxmJX1nFMmKroxMLWPyTAzkKB50bZnE4Pu=0ch1CfR7FhNXw@mail.gmail.com>

On Fri, Jan 29, 2016 at 02:10:17PM +0100, Bartosz Golaszewski wrote:
> Hi Andrew,
> 
> the patch works, but I'm hitting the following BUG when instantiating
> an at24c32 device:

Hi Bortosz

Sorry for taking so long to get back to you. Can you confirm you had
lockdep turned on.

Thanks
	Andrew

> 
> # echo 24c32 0x54 > /sys/class/i2c-adapter/i2c-2/new_device
> [    3.741893] BUG: key de753e8c not in .data!
> [    3.749166] ------------[ cut here ]------------
> [    3.756649] WARNING: CPU: 0 PID: 102 at
> kernel/locking/lockdep.c:3002 __kernfs_create_file+0x60/0xc4()
> [    3.769048] DEBUG_LOCKS_WARN_ON(1)
> [    3.772463] Modules linked in: at24(+) nvmem_core cpufreq_dt
> omap_wdt thermal_sys leds_gpio led_class hwmon
> [    3.788301] CPU: 0 PID: 102 Comm: udevd Not tainted 4.5.0-rc1-acme+ #7
> [    3.797833] Hardware name: Generic AM33XX (Flattened Device Tree)
> [    3.806920] [<c0017d44>] (unwind_backtrace) from [<c0014034>]
> (show_stack+0x10/0x14)
> [    3.817762] [<c0014034>] (show_stack) from [<c036b478>]
> (dump_stack+0x84/0x9c)
> [    3.828071] [<c036b478>] (dump_stack) from [<c003c850>]
> (warn_slowpath_common+0x7c/0xb8)
> [    3.839284] [<c003c850>] (warn_slowpath_common) from [<c003c8bc>]
> (warn_slowpath_fmt+0x30/0x40)
> [    3.851154] [<c003c8bc>] (warn_slowpath_fmt) from [<c01fbf3c>]
> (__kernfs_create_file+0x60/0xc4)
> [    3.863025] [<c01fbf3c>] (__kernfs_create_file) from [<c01fc794>]
> (sysfs_add_file_mode_ns+0x98/0x1bc)
> [    3.875488] [<c01fc794>] (sysfs_add_file_mode_ns) from [<c01fca40>]
> (sysfs_create_bin_file+0x38/0x44)
> [    3.888000] [<c01fca40>] (sysfs_create_bin_file) from [<bf033770>]
> (nvmem_register+0x2cc/0x34c [nvmem_core])
> [    3.901190] [<bf033770>] (nvmem_register [nvmem_core]) from
> [<bf03c958>] (at24_probe+0x430/0x59c [at24])
> [    3.914055] [<bf03c958>] (at24_probe [at24]) from [<c054be80>]
> (i2c_device_probe+0x168/0x1fc)
> [    3.925926] [<c054be80>] (i2c_device_probe) from [<c045ba44>]
> (driver_probe_device+0x208/0x2c0)
> [    3.938003] [<c045ba44>] (driver_probe_device) from [<c045bb90>]
> (__driver_attach+0x94/0x98)
> [    3.949821] [<c045bb90>] (__driver_attach) from [<c0459d80>]
> (bus_for_each_dev+0x6c/0xa0)
> [    3.961373] [<c0459d80>] (bus_for_each_dev) from [<c045b038>]
> (bus_add_driver+0x18c/0x214)
> [    3.973037] [<c045b038>] (bus_add_driver) from [<c045c4f4>]
> (driver_register+0x78/0xf8)
> [    3.984458] [<c045c4f4>] (driver_register) from [<c054ca00>]
> (i2c_register_driver+0x2c/0x80)
> [    3.996349] [<c054ca00>] (i2c_register_driver) from [<c0009804>]
> (do_one_initcall+0x80/0x1e0)
> [    4.008344] [<c0009804>] (do_one_initcall) from [<c0123110>]
> (do_init_module+0x5c/0x1d4)
> [    4.019910] [<c0123110>] (do_init_module) from [<c00cb2e4>]
> (load_module+0x1cc0/0x1f48)
> [    4.031378] [<c00cb2e4>] (load_module) from [<c00cb71c>]
> (SyS_finit_module+0x64/0x74)
> [    4.042665] [<c00cb71c>] (SyS_finit_module) from [<c000f820>]
> (ret_fast_syscall+0x0/0x1c)
> [    4.054322] ---[ end trace 692db3ff57b96549 ]---
> [    4.062228] at24 2-0054: 4096 byte 24c32 EEPROM, writable, 1 bytes/write
> [    4.073224] i2c i2c-2: new_device: Instantiated device 24c32 at 0x54
> 
> It seems to result in the nvmem attribute having 0 size while the
> legacy eeprom file has size corresponding with the chip's memory area
> size in bytes.
> 
> Best regards,
> Bartosz Golaszewski

  parent reply	other threads:[~2016-02-12  9:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-28 15:42 [PATCH 0/7] Convert exiting EEPROM drivers to NVMEM Andrew Lunn
2016-01-28 15:42 ` [PATCH 1/7] nvmem: Add flag to export NVMEM to root only Andrew Lunn
2016-01-28 15:42 ` [PATCH 2/7] nvmem: Add backwards compatibility support for older EEPROM drivers Andrew Lunn
2016-01-28 15:42 ` [PATCH 3/7] eeprom: at24: extend driver to plug into the NVMEM framework Andrew Lunn
2016-01-29 13:10   ` Bartosz Golaszewski
2016-02-02  2:28     ` Andrew Lunn
2016-02-12  9:16     ` Andrew Lunn [this message]
2016-02-12 11:02       ` Bartosz Golaszewski
2016-01-28 15:42 ` [PATCH 4/7] eeprom: at25: Remove in kernel API for accessing the EEPROM Andrew Lunn
2016-01-28 15:42 ` [PATCH 5/7] eeprom: at25: extend driver to plug into the NVMEM framework Andrew Lunn
2016-01-28 15:42 ` [PATCH 6/7] eeprom: 93xx46: " Andrew Lunn
2016-01-28 15:42 ` [PATCH 7/7] misc: at24: replace memory_accessor with nvmem_device_read Andrew Lunn

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=20160212091612.GB9276@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=bgolaszewski@baylibre.com \
    --cc=broonie@kernel.org \
    --cc=fd@ti.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.ripard@free-electrons.com \
    --cc=pantelis.antoniou@konsulko.com \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=vz@mleia.com \
    --cc=wsa@the-dreams.de \
    /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

all inboxes | Powered by JetHome®