Re: [PATCH v4 6/8] mfd: cros_ec: Support multiple EC in a system

From: Javier Martinez Canillas
Date: Wed Jun 03 2015 - 07:49:31 EST


Hello Lee,

On 06/03/2015 01:27 PM, Lee Jones wrote:
> On Wed, 03 Jun 2015, Javier Martinez Canillas wrote:

[snip]

>> >>
>> >> - err = mfd_add_devices(dev, 0, cros_devs,
>> >> - ARRAY_SIZE(cros_devs),
>> >> + if (IS_ENABLED(CONFIG_OF) && dev->of_node)
>> >> + ec_p.ec_name = of_get_property(dev->of_node, "devname",
>> >> + NULL);
>> >
>> > Has this binding already been accepted? We don't normally allow
>> > "device name"properties in DT.
>> >
>>
>> Sigh, I now noticed that I missed the DT binding change when originally
>> forward porting the patches from the downstream ChromiumOS tree. I'm so
>> sorry about that.
>>
>> ChromiumOS tree has in Documentation/devicetree/bindings/mfd/cros-ec.txt:
>>
>> Optional properties (All):
>> - devname: name of the EC. Can be based on its function: for instance,
>> for Sensor Hub, 'cros_sh', for Power Delivery MCU 'cros_pd'.
>> If not present, 'cros_ec' can be assumed.
>>
>> When you say that normally device names are not allowed in DT, do you mean
>> that "devname" is a too generic property name? (which I totally agree) or
>> that DT bindings shouldn't have a property to change a device's name for
>> something more descriptive?
>>
>> Because for example, the regulator bindings has a "regulator-name" property.
>> If you agree I can change the property to "google,cros-ec-name" which should
>> be more precise.
>
> I mean, no names of devices are allowed in Device Tree:
>
> `git grep name -- arch/arm/boot/dts/ | grep dev`
>

Ok, but do you agree on having a "google,cros-ec-name" (with no dev on it)
property to define the resource name just like regulators have "regulator-name"
that changes what is shown in /sys/kernel/debug/regulator/$name?

Otherwise all the EC's will be named cros_ec or regardless of their function
and this is shown in both /dev/$name and /sys/class/chromeos/$name.

Best regards,
Javier
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/