diff mbox

[U-Boot,25/55] dm: pmic: max77686: Correct a few nits

Message ID 1435882592-487-26-git-send-email-sjg@chromium.org
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass July 3, 2015, 12:16 a.m. UTC
The driver name should not have a space in it. Also the regulator names
should match the case of the device tree. Fix these problems.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/power/pmic/max77686.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Przemyslaw Marczak July 10, 2015, 11:53 a.m. UTC | #1
Hello Simon,

On 07/03/2015 02:16 AM, Simon Glass wrote:
> The driver name should not have a space in it. Also the regulator names
> should match the case of the device tree. Fix these problems.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>   drivers/power/pmic/max77686.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/power/pmic/max77686.c b/drivers/power/pmic/max77686.c
> index 3523b4a..dc5a54a 100644
> --- a/drivers/power/pmic/max77686.c
> +++ b/drivers/power/pmic/max77686.c
> @@ -17,8 +17,8 @@
>   DECLARE_GLOBAL_DATA_PTR;
>
>   static const struct pmic_child_info pmic_children_info[] = {
> -	{ .prefix = "ldo", .driver = MAX77686_LDO_DRIVER },
> -	{ .prefix = "buck", .driver = MAX77686_BUCK_DRIVER },
> +	{ .prefix = "LDO", .driver = MAX77686_LDO_DRIVER },
> +	{ .prefix = "BUCK", .driver = MAX77686_BUCK_DRIVER },
>   	{ },
>   };
>
> @@ -84,7 +84,7 @@ static const struct udevice_id max77686_ids[] = {
>   };
>
>   U_BOOT_DRIVER(pmic_max77686) = {
> -	.name = "max77686 pmic",
> +	.name = "max77686_pmic",
>   	.id = UCLASS_PMIC,
>   	.of_match = max77686_ids,
>   	.bind = max77686_bind,
>

Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>

This change is ok, but could you please consider Odroid U3 
(exynos4412-odroid.dts) within this patch set?

Regards
Simon Glass July 27, 2015, 11:30 p.m. UTC | #2
Hi Przemyslaw,

On 10 July 2015 at 05:53, Przemyslaw Marczak <p.marczak@samsung.com> wrote:
> Hello Simon,
>
> On 07/03/2015 02:16 AM, Simon Glass wrote:
>>
>> The driver name should not have a space in it. Also the regulator names
>> should match the case of the device tree. Fix these problems.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> ---
>>
>>   drivers/power/pmic/max77686.c | 6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/power/pmic/max77686.c b/drivers/power/pmic/max77686.c
>> index 3523b4a..dc5a54a 100644
>> --- a/drivers/power/pmic/max77686.c
>> +++ b/drivers/power/pmic/max77686.c
>> @@ -17,8 +17,8 @@
>>   DECLARE_GLOBAL_DATA_PTR;
>>
>>   static const struct pmic_child_info pmic_children_info[] = {
>> -       { .prefix = "ldo", .driver = MAX77686_LDO_DRIVER },
>> -       { .prefix = "buck", .driver = MAX77686_BUCK_DRIVER },
>> +       { .prefix = "LDO", .driver = MAX77686_LDO_DRIVER },
>> +       { .prefix = "BUCK", .driver = MAX77686_BUCK_DRIVER },
>>         { },
>>   };
>>
>> @@ -84,7 +84,7 @@ static const struct udevice_id max77686_ids[] = {
>>   };
>>
>>   U_BOOT_DRIVER(pmic_max77686) = {
>> -       .name = "max77686 pmic",
>> +       .name = "max77686_pmic",
>>         .id = UCLASS_PMIC,
>>         .of_match = max77686_ids,
>>         .bind = max77686_bind,
>>
>
> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
>
> This change is ok, but could you please consider Odroid U3
> (exynos4412-odroid.dts) within this patch set?

Ah, does that mean that these need to change to upper case to match the driver?

Applied to u-boot-dm.

>
> Regards
> --
> Przemyslaw Marczak
> Samsung R&D Institute Poland
> Samsung Electronics
> p.marczak@samsung.com

Regards,
Simon
Przemyslaw Marczak July 28, 2015, 6:19 a.m. UTC | #3
Hello Simon,

On 07/28/2015 01:30 AM, Simon Glass wrote:
> Hi Przemyslaw,
>
> On 10 July 2015 at 05:53, Przemyslaw Marczak <p.marczak@samsung.com> wrote:
>> Hello Simon,
>>
>> On 07/03/2015 02:16 AM, Simon Glass wrote:
>>>
>>> The driver name should not have a space in it. Also the regulator names
>>> should match the case of the device tree. Fix these problems.
>>>
>>> Signed-off-by: Simon Glass <sjg@chromium.org>
>>> ---
>>>
>>>    drivers/power/pmic/max77686.c | 6 +++---
>>>    1 file changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/power/pmic/max77686.c b/drivers/power/pmic/max77686.c
>>> index 3523b4a..dc5a54a 100644
>>> --- a/drivers/power/pmic/max77686.c
>>> +++ b/drivers/power/pmic/max77686.c
>>> @@ -17,8 +17,8 @@
>>>    DECLARE_GLOBAL_DATA_PTR;
>>>
>>>    static const struct pmic_child_info pmic_children_info[] = {
>>> -       { .prefix = "ldo", .driver = MAX77686_LDO_DRIVER },
>>> -       { .prefix = "buck", .driver = MAX77686_BUCK_DRIVER },
>>> +       { .prefix = "LDO", .driver = MAX77686_LDO_DRIVER },
>>> +       { .prefix = "BUCK", .driver = MAX77686_BUCK_DRIVER },
>>>          { },
>>>    };
>>>
>>> @@ -84,7 +84,7 @@ static const struct udevice_id max77686_ids[] = {
>>>    };
>>>
>>>    U_BOOT_DRIVER(pmic_max77686) = {
>>> -       .name = "max77686 pmic",
>>> +       .name = "max77686_pmic",
>>>          .id = UCLASS_PMIC,
>>>          .of_match = max77686_ids,
>>>          .bind = max77686_bind,
>>>
>>
>> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
>>
>> This change is ok, but could you please consider Odroid U3
>> (exynos4412-odroid.dts) within this patch set?
>
> Ah, does that mean that these need to change to upper case to match the driver?
>
> Applied to u-boot-dm.
>

Right, since pmic_bind_children() is using strncmp() to bind regulators 
by prefix, this change breaks the Odroid U3.

>>
>> Regards
>> --
>> Przemyslaw Marczak
>> Samsung R&D Institute Poland
>> Samsung Electronics
>> p.marczak@samsung.com
>
> Regards,
> Simon
>

Best Regards,
Simon Glass Aug. 3, 2015, 2:02 p.m. UTC | #4
Hi Przemyslaw,

On 28 July 2015 at 00:19, Przemyslaw Marczak <p.marczak@samsung.com> wrote:
> Hello Simon,
>
>
> On 07/28/2015 01:30 AM, Simon Glass wrote:
>>
>> Hi Przemyslaw,
>>
>> On 10 July 2015 at 05:53, Przemyslaw Marczak <p.marczak@samsung.com>
>> wrote:
>>>
>>> Hello Simon,
>>>
>>> On 07/03/2015 02:16 AM, Simon Glass wrote:
>>>>
>>>>
>>>> The driver name should not have a space in it. Also the regulator names
>>>> should match the case of the device tree. Fix these problems.
>>>>
>>>> Signed-off-by: Simon Glass <sjg@chromium.org>
>>>> ---
>>>>
>>>>    drivers/power/pmic/max77686.c | 6 +++---
>>>>    1 file changed, 3 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/drivers/power/pmic/max77686.c
>>>> b/drivers/power/pmic/max77686.c
>>>> index 3523b4a..dc5a54a 100644
>>>> --- a/drivers/power/pmic/max77686.c
>>>> +++ b/drivers/power/pmic/max77686.c
>>>> @@ -17,8 +17,8 @@
>>>>    DECLARE_GLOBAL_DATA_PTR;
>>>>
>>>>    static const struct pmic_child_info pmic_children_info[] = {
>>>> -       { .prefix = "ldo", .driver = MAX77686_LDO_DRIVER },
>>>> -       { .prefix = "buck", .driver = MAX77686_BUCK_DRIVER },
>>>> +       { .prefix = "LDO", .driver = MAX77686_LDO_DRIVER },
>>>> +       { .prefix = "BUCK", .driver = MAX77686_BUCK_DRIVER },
>>>>          { },
>>>>    };
>>>>
>>>> @@ -84,7 +84,7 @@ static const struct udevice_id max77686_ids[] = {
>>>>    };
>>>>
>>>>    U_BOOT_DRIVER(pmic_max77686) = {
>>>> -       .name = "max77686 pmic",
>>>> +       .name = "max77686_pmic",
>>>>          .id = UCLASS_PMIC,
>>>>          .of_match = max77686_ids,
>>>>          .bind = max77686_bind,
>>>>
>>>
>>> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
>>>
>>> This change is ok, but could you please consider Odroid U3
>>> (exynos4412-odroid.dts) within this patch set?
>>
>>
>> Ah, does that mean that these need to change to upper case to match the
>> driver?
>>
>> Applied to u-boot-dm.
>>
>
> Right, since pmic_bind_children() is using strncmp() to bind regulators by
> prefix, this change breaks the Odroid U3.
>

OK. I'll address this with a separate patch which can be placed before
the one that breaks it.

Regards,
Simon
diff mbox

Patch

diff --git a/drivers/power/pmic/max77686.c b/drivers/power/pmic/max77686.c
index 3523b4a..dc5a54a 100644
--- a/drivers/power/pmic/max77686.c
+++ b/drivers/power/pmic/max77686.c
@@ -17,8 +17,8 @@ 
 DECLARE_GLOBAL_DATA_PTR;
 
 static const struct pmic_child_info pmic_children_info[] = {
-	{ .prefix = "ldo", .driver = MAX77686_LDO_DRIVER },
-	{ .prefix = "buck", .driver = MAX77686_BUCK_DRIVER },
+	{ .prefix = "LDO", .driver = MAX77686_LDO_DRIVER },
+	{ .prefix = "BUCK", .driver = MAX77686_BUCK_DRIVER },
 	{ },
 };
 
@@ -84,7 +84,7 @@  static const struct udevice_id max77686_ids[] = {
 };
 
 U_BOOT_DRIVER(pmic_max77686) = {
-	.name = "max77686 pmic",
+	.name = "max77686_pmic",
 	.id = UCLASS_PMIC,
 	.of_match = max77686_ids,
 	.bind = max77686_bind,