Re: [PATCH] misc/eeprom/at24: init dynamic bin_attribute structures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Just an other dumb question:  as I mentioned, the driver is loaded even if no
> chip is attached to the i2c bus.  Wouldn't it make sense to check if the chip
> is there (e.g. by reading the first byte), and eject with ENODEV if it isn't?

That would be part of a detect-callback. In probe() the device is already
considered to be present. But you can instantiate devices at runtime if you
want to add the eeprom dynamically (Documentation/i2c/instantiating-devices)

Regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux