Re: [PATCH v5 7/9] mfd: cros_ec: Support multiple EC in a system

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hello Lee,

On 06/03/2015 03:49 PM, Lee Jones wrote:

[...]

>>  
>>  int cros_ec_register(struct cros_ec_device *ec_dev)
>> @@ -52,14 +68,39 @@ int cros_ec_register(struct cros_ec_device *ec_dev)
>>  
>>  	cros_ec_query_all(ec_dev);
>>  
>> -	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,
>> +					       "google,cros-ec-name", NULL);
> 
> NACK
> 
> You either need to obtain this another way, or have a chat with the DT
> Maintainers and explain why this platform is special enough to break
> the normal conventions.
> 
> HINT: I different compatible string is normally more amenable, but
> this will also require a DT ACK for me to take it through.
>

Ok, I'll just remove the property then. After all the driver only supports
two types of controllers currently, the normal host EC and the Power Delivery
(PD) one. And there isn't a DTS even in the downstream ChromiumOS tree that
is setting a different EC name right now.

I guess the idea of the binding was to make it future proof from when the
driver supports more types of controllers but I'll let Gwendal to comment on
this since he is the author of these patches.

>> +	if (!ec_p.ec_name)
>> +		ec_p.ec_name = CROS_EC_DEV_NAME;
>> +
>> +	err = mfd_add_devices(ec_dev->dev, PLATFORM_DEVID_AUTO, &ec_cell, 1,
>>  			      NULL, ec_dev->irq, NULL);
>>  	if (err) {
>> -		dev_err(dev, "failed to add mfd devices\n");
>> +		dev_err(dev, "failed to add ec\n");
> 
> Might be nice to expand 'ec' so your users have half a chance in
> deciphering what just went wrong.
>

I will, thanks a lot for your feedback.
 
> [...]
> 

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




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux