linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question about I2C driver upstream from same SoC vendor
@ 2016-06-21  7:59 M'boumba Cedric Madianga
  2016-06-21 10:59 ` Wolfram Sang
  0 siblings, 1 reply; 2+ messages in thread
From: M'boumba Cedric Madianga @ 2016-06-21  7:59 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c

Hi Wolfram,

I am currently upstreaming a driver to support the I2C controller
embedded in STM32F4 SoC from ST.
In the meantime, I am thinking how to add the support of the I2C
controller embedded in STM32F7 SoC.
The I2C IP are very different between F4 and F7 SoC in term of IP
engine, registers and so on.
So, I have intended to develop 2 different drivers, the first one
called i2c-stm32f4.c and the second one called i2c-stm32f7.c.
I am wondering if it is the good way of working as I noticed that many
maintainers prefer to have one driver that support all IPs of the same
SoC vendor ?
In our case, I think it will be possible to support both I2C IPs in
one driver called i2c-stm32.c but the code will run of readability and
will be difficult to maintain...

Thanks in advance for your feedback.

BR,
Cedric

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

* Re: Question about I2C driver upstream from same SoC vendor
  2016-06-21  7:59 Question about I2C driver upstream from same SoC vendor M'boumba Cedric Madianga
@ 2016-06-21 10:59 ` Wolfram Sang
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2016-06-21 10:59 UTC (permalink / raw)
  To: M'boumba Cedric Madianga; +Cc: linux-i2c

[-- Attachment #1: Type: text/plain, Size: 772 bytes --]

Hi Cedric,

> I am wondering if it is the good way of working as I noticed that many
> maintainers prefer to have one driver that support all IPs of the same
> SoC vendor ?

Really? That doesn't sound too healthy to me...

> In our case, I think it will be possible to support both I2C IPs in
> one driver called i2c-stm32.c but the code will run of readability and
> will be difficult to maintain...

I think a driver should handle the same or similar IP cores. Quite the
contrary, the same IP cores can be found in SoCs from different vendors.
They should then *still* be handled by the same driver. I usually
compare register sets to decide which way to go.

For your case, this sounds pretty much like a second driver. Good you
asked beforehand.

Thanks,

   Wolfram


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, other threads:[~2016-06-21 12:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-21  7:59 Question about I2C driver upstream from same SoC vendor M'boumba Cedric Madianga
2016-06-21 10:59 ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).