* [PATCH] i2c: slave-eeprom: add an of_match_table
@ 2021-05-04 13:52 Björn Ardö
2021-06-26 10:31 ` Wolfram Sang
0 siblings, 1 reply; 3+ messages in thread
From: Björn Ardö @ 2021-05-04 13:52 UTC (permalink / raw)
To: wsa; +Cc: linux-i2c, kernel, Björn Ardö
This is needed since commit af503716ac14 ("i2c: core: report OF style
module alias for devices registered via OF").
Signed-off-by: Björn Ardö <bjorn.ardo@axis.com>
---
drivers/i2c/i2c-slave-eeprom.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/i2c/i2c-slave-eeprom.c b/drivers/i2c/i2c-slave-eeprom.c
index 5c7ae421cacf..89274b72b369 100644
--- a/drivers/i2c/i2c-slave-eeprom.c
+++ b/drivers/i2c/i2c-slave-eeprom.c
@@ -204,9 +204,23 @@ static const struct i2c_device_id i2c_slave_eeprom_id[] = {
};
MODULE_DEVICE_TABLE(i2c, i2c_slave_eeprom_id);
+static const struct of_device_id i2c_slave_eeprom_match[] = {
+ { .compatible = "linux,slave-24c02", },
+ { .compatible = "linux,slave-24c02ro", },
+ { .compatible = "linux,slave-24c32", },
+ { .compatible = "linux,slave-24c32ro", },
+ { .compatible = "linux,slave-24c64", },
+ { .compatible = "linux,slave-24c64ro", },
+ { .compatible = "linux,slave-24c512", },
+ { .compatible = "linux,slave-24c512ro", },
+ { }
+};
+MODULE_DEVICE_TABLE(of, i2c_slave_eeprom_match);
+
static struct i2c_driver i2c_slave_eeprom_driver = {
.driver = {
.name = "i2c-slave-eeprom",
+ .of_match_table = i2c_slave_eeprom_match,
},
.probe = i2c_slave_eeprom_probe,
.remove = i2c_slave_eeprom_remove,
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c: slave-eeprom: add an of_match_table
2021-05-04 13:52 [PATCH] i2c: slave-eeprom: add an of_match_table Björn Ardö
@ 2021-06-26 10:31 ` Wolfram Sang
2021-08-20 12:07 ` Bjorn Ardo
0 siblings, 1 reply; 3+ messages in thread
From: Wolfram Sang @ 2021-06-26 10:31 UTC (permalink / raw)
To: Björn Ardö; +Cc: linux-i2c, kernel
[-- Attachment #1: Type: text/plain, Size: 422 bytes --]
On Tue, May 04, 2021 at 03:52:09PM +0200, Björn Ardö wrote:
> This is needed since commit af503716ac14 ("i2c: core: report OF style
> module alias for devices registered via OF").
>
> Signed-off-by: Björn Ardö <bjorn.ardo@axis.com>
I'm afraid we need a YAML file, too. checkpatch says:
WARNING: DT compatible string "linux,slave-24c02" appears un-documented -- check ./Documentation/devicetree/bindings/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c: slave-eeprom: add an of_match_table
2021-06-26 10:31 ` Wolfram Sang
@ 2021-08-20 12:07 ` Bjorn Ardo
0 siblings, 0 replies; 3+ messages in thread
From: Bjorn Ardo @ 2021-08-20 12:07 UTC (permalink / raw)
To: Wolfram Sang, linux-i2c, kernel
Hi,
This is missing for the entire module, so maybe then it should be added
for the existing DT-API as a separate patch and then this patch can just
add the things it is actually adding to the API? Or do you think it
should be included here?
/BA
On 6/26/21 12:31 PM, Wolfram Sang wrote:
> On Tue, May 04, 2021 at 03:52:09PM +0200, Björn Ardö wrote:
>> This is needed since commit af503716ac14 ("i2c: core: report OF style
>> module alias for devices registered via OF").
>>
>> Signed-off-by: Björn Ardö <bjorn.ardo@axis.com>
> I'm afraid we need a YAML file, too. checkpatch says:
>
> WARNING: DT compatible string "linux,slave-24c02" appears un-documented -- check ./Documentation/devicetree/bindings/
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-20 12:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-04 13:52 [PATCH] i2c: slave-eeprom: add an of_match_table Björn Ardö
2021-06-26 10:31 ` Wolfram Sang
2021-08-20 12:07 ` Bjorn Ardo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.