Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1462496

Re: [PATCH v2] eeprom: at24: check if the chip is functional in probe()

From Wolfram Sang <wsa@the-dreams.de>
Newsgroups linux.kernel
Subject Re: [PATCH v2] eeprom: at24: check if the chip is functional in probe()
Date 2016-08-15 00:20 +0200
Message-ID <s6bV7-5Cc-15@gated-at.bofh.it> (permalink)
References <s5iYF-12Q-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Fri, Aug 12, 2016 at 01:32:57PM +0200, Bartosz Golaszewski wrote:
> The at24 driver doesn't check if the chip is functional in its probe
> function. This leads to instantiating devices that are not physically
> present. For example the cape EEPROMs for BeagleBone Black are defined
> in the device tree at four addresses on i2c2, but normally only one of
> them is present.
> 
> If the userspace doesn't know the location in advance, it will need to
> check if reading the nvmem attributes fails to determine which EEPROM
> is actually there.
> 
> Try to read a single byte in probe() and bail-out with -ENODEV if the
> read fails.
> 
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Applied to for-next, thanks!

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH v2] eeprom: at24: check if the chip is functional in probe() Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2016-08-12 13:40 +0200
  Re: [PATCH v2] eeprom: at24: check if the chip is functional in  probe() Wolfram Sang <wsa@the-dreams.de> - 2016-08-15 00:20 +0200

csiph-web