diff options
author | Ben Gardner <gardner.ben@gmail.com> | 2017-02-09 11:36:08 -0600 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2017-02-11 21:23:43 +0100 |
commit | dd905a61e95e057277115888e1b8d5d9070795e1 (patch) | |
tree | 27190d38718623a66b5d72e6d78882f30591e68f /lib/string_helpers.c | |
parent | 465b2c4ab8724196bc33d82679a19b28e7a1d37e (diff) |
misc: eeprom: at24: use device_property_*() functions instead of of_get_property()
Allow the at24 driver to get configuration information from both OF and
ACPI by using the more generic device_property functions.
This change was inspired by the at25.c driver.
I have a custom board with a ST M24C02 EEPROM attached to an I2C bus.
With the following ACPI construct, this patch instantiates a working
instance of the driver.
Device (EEP0) {
Name (_HID, "PRP0001")
Name (_DSD, Package () {
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
Package () {
Package () {"compatible", Package () {"st,24c02"}},
Package () {"pagesize", 16},
},
})
Name (_CRS, ResourceTemplate () {
I2cSerialBus (
0x0057, ControllerInitiated, 400000,
AddressingMode7Bit, "\\_SB.PCI0.I2C3", 0x00,
ResourceConsumer,,)
})
}
Signed-off-by: Ben Gardner <gardner.ben@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'lib/string_helpers.c')
0 files changed, 0 insertions, 0 deletions