[PATCH 1/5] ARM: Samsung: PWM: Allow to differentiate SoCs based on platform device name.

Mark Brown broonie at opensource.wolfsonmicro.com
Wed Sep 7 15:01:21 EDT 2011

On Tue, Sep 06, 2011 at 01:04:30PM +0100, Russell King - ARM Linux wrote:

> Pros to platform driver name:
> 1. Can re-use existing names if feature compatible without driver mods.
> 2. Scales well with an increasing number of SoCs.

> Cons:
> 1. People will hate having SoC names which don't refer to their exact SoC.
> 2. Probably requires storage of a set of flags in driver private data
>    to identify SoC specific features.
> 3. Requires additional string space to identify each driver name.

There's also an issue with actually getting the devices together to
register which causes fragility here.

> However, thinking about this more wrt DT, there's another aspect to this.
> Rather than encoding into the driver "this SoC has features and quirks
> X,Y,Z" maybe that information should be in the device tree itself.  For
> example, SoC 1 has X and Z, SoC 2 has Y.  Then a new SoC 3 comes along
> with X and Y but not Z.  If X, Y, Z are encoded into DT then there's no
> need to touch the kernel to support SoC 3, not even to change driver
> names or soc_is_xxx macros etc.

This does depend pretty strongly on making sure that the SoC DT is
distributed separately to the board DT - that should be solved now.

More information about the linux-arm-kernel mailing list