public inbox for kernelnewbies@kernelnewbies.org
 help / color / mirror / Atom feed
* Handling I2C eeprom devices
@ 2024-05-17 13:33 Patryk
  2024-05-17 16:23 ` Rémi ESSAISSI
  2024-05-17 20:31 ` jim.cromie
  0 siblings, 2 replies; 3+ messages in thread
From: Patryk @ 2024-05-17 13:33 UTC (permalink / raw)
  To: kernelnewbies

Hi,
I've got a question regarding how to handle I2C eeprom devices. I see
that in the kernel/drivers/misc/eeprom there are not that many drivers
available. Does it mean that they support various chips that do not
necessarily come from one vendor?
Looking at example at24.c, in the compatible properties I see that all
of them refers to atmel, however when I compared the following
devices: AT24C04C and BRCB008GWZ, at the first glance they look kinda
similar:
- they are organized internally in the same way - 1024 x 8 (8K)
- read/write commands looks the same

I'm not asking you to tell me whether or not it's possible this driver
at24 with the device I need (BRCB008GWZ), rather I would like to get a
suggestion on how to approach this and what factors I should take into
account to make the right decision.

Best regards
Patryk

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Handling I2C eeprom devices
  2024-05-17 13:33 Handling I2C eeprom devices Patryk
@ 2024-05-17 16:23 ` Rémi ESSAISSI
  2024-05-17 20:31 ` jim.cromie
  1 sibling, 0 replies; 3+ messages in thread
From: Rémi ESSAISSI @ 2024-05-17 16:23 UTC (permalink / raw)
  To: kernelnewbies



Le 17/05/2024 à 15:33, Patryk a écrit :
> Hi,
> I've got a question regarding how to handle I2C eeprom devices. I see
> that in the kernel/drivers/misc/eeprom there are not that many drivers
> available. Does it mean that they support various chips that do not
> necessarily come from one vendor?
> Looking at example at24.c, in the compatible properties I see that all
> of them refers to atmel, however when I compared the following
> devices: AT24C04C and BRCB008GWZ, at the first glance they look kinda
> similar:
> - they are organized internally in the same way - 1024 x 8 (8K)



> - read/write commands looks the same
Those chips may look the "same", but they differ in the magic sequences 
to interact with them.
I mean, they have to be exactly the same to work, up to the timing that 
has to follow the specs by the milli or micro second for example.
(and sometimes even weird voltages to apply on this or that pin ... )

So your best friend is the Datasheet of your IC delivered by the 
vendor/constructor of that chip, that will give you the magic sequences 
to interact with it .

Your case should be easy as you already have more than a working 
"skeleton" ... .


Regards


> 
> I'm not asking you to tell me whether or not it's possible this driver
> at24 with the device I need (BRCB008GWZ), rather I would like to get a
> suggestion on how to approach this and what factors I should take into
> account to make the right decision.
> 
> Best regards
> Patryk
> 
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Handling I2C eeprom devices
  2024-05-17 13:33 Handling I2C eeprom devices Patryk
  2024-05-17 16:23 ` Rémi ESSAISSI
@ 2024-05-17 20:31 ` jim.cromie
  1 sibling, 0 replies; 3+ messages in thread
From: jim.cromie @ 2024-05-17 20:31 UTC (permalink / raw)
  To: Patryk; +Cc: kernelnewbies

On Fri, May 17, 2024 at 7:35 AM Patryk <pbiel7@gmail.com> wrote:
>
> Hi,
> I've got a question regarding how to handle I2C eeprom devices. I see
> that in the kernel/drivers/misc/eeprom there are not that many drivers
> available. Does it mean that they support various chips that do not
> necessarily come from one vendor?
> Looking at example at24.c, in the compatible properties I see that all
> of them refers to atmel, however when I compared the following
> devices: AT24C04C and BRCB008GWZ, at the first glance they look kinda
> similar:
> - they are organized internally in the same way - 1024 x 8 (8K)
> - read/write commands looks the same
>
> I'm not asking you to tell me whether or not it's possible this driver
> at24 with the device I need (BRCB008GWZ), rather I would like to get a
> suggestion on how to approach this and what factors I should take into
> account to make the right decision.
>
> Best regards
> Patryk
>

$ git ls-files | grep eprom | wc -l
89
[jimc@frodo linux.git]$ git ls-files | grep eprom\.h | wc -l
29
[jimc@frodo linux.git]$ git ls-files | grep eprom  | grep include
arch/parisc/include/asm/eisa_eeprom.h
arch/sparc/include/asm/eeprom.h
drivers/staging/rtl8723bs/include/rtw_eeprom.h
include/linux/eeprom_93cx6.h
include/linux/eeprom_93xx46.h
include/linux/spi/eeprom.h
include/media/tveeprom.h

Id look at those headers for similarity,
then the 2 c files in misc for similarity.

also the files under devicetree - thats ALL interface defn

you didnt say if those parts are I2C or SPI or what.

do you have the hardware ?

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-17 20:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-17 13:33 Handling I2C eeprom devices Patryk
2024-05-17 16:23 ` Rémi ESSAISSI
2024-05-17 20:31 ` jim.cromie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox