* [PATCH] mfd mc13xxx: add MC13892_REVISION_2_4
@ 2016-08-17 13:12 Alexander Kurz
2016-08-18 7:15 ` Sascha Hauer
0 siblings, 1 reply; 5+ messages in thread
From: Alexander Kurz @ 2016-08-17 13:12 UTC (permalink / raw)
To: barebox; +Cc: Alexander Kurz
An MC13892CJ having REV[4:0]=0x14 can be found in the kindle-d01100.
Add the revision to the list to support this device.
Signed-off-by: Alexander Kurz <akurz@blala.de>
---
drivers/mfd/mc13xxx.c | 1 +
include/mfd/mc13xxx.h | 13 +++++++------
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/mfd/mc13xxx.c b/drivers/mfd/mc13xxx.c
index b2fcd95..f6aa922 100644
--- a/drivers/mfd/mc13xxx.c
+++ b/drivers/mfd/mc13xxx.c
@@ -219,6 +219,7 @@ static struct __init {
{ 0x0a, MC13892_REVISION_1_2, "1.2" },
{ 0x10, MC13892_REVISION_2_0, "2.0" },
{ 0x11, MC13892_REVISION_2_1, "2.1" },
+ { 0x14, MC13892_REVISION_2_4, "2.4" },
{ 0x18, MC13892_REVISION_3_0, "3.0" },
{ 0x19, MC13892_REVISION_3_1, "3.1" },
{ 0x1a, MC13892_REVISION_3_2, "3.2" },
diff --git a/include/mfd/mc13xxx.h b/include/mfd/mc13xxx.h
index 96a32e4..d351c47 100644
--- a/include/mfd/mc13xxx.h
+++ b/include/mfd/mc13xxx.h
@@ -127,12 +127,13 @@
#define MC13892_REVISION_2_0 3
#define MC13892_REVISION_2_0a 4
#define MC13892_REVISION_2_1 5
-#define MC13892_REVISION_3_0 6
-#define MC13892_REVISION_3_1 7
-#define MC13892_REVISION_3_2 8
-#define MC13892_REVISION_3_2a 9
-#define MC13892_REVISION_3_3 10
-#define MC13892_REVISION_3_5 11
+#define MC13892_REVISION_2_4 6
+#define MC13892_REVISION_3_0 7
+#define MC13892_REVISION_3_1 8
+#define MC13892_REVISION_3_2 9
+#define MC13892_REVISION_3_2a 10
+#define MC13892_REVISION_3_3 11
+#define MC13892_REVISION_3_5 12
#define MC13783_SWX_VOLTAGE(x) ((x) & 0x3f)
#define MC13783_SWX_VOLTAGE_DVS(x) (((x) & 0x3f) << 6)
--
2.1.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mfd mc13xxx: add MC13892_REVISION_2_4
2016-08-17 13:12 [PATCH] mfd mc13xxx: add MC13892_REVISION_2_4 Alexander Kurz
@ 2016-08-18 7:15 ` Sascha Hauer
2016-08-18 7:20 ` Re[2]: " Alexander Shiyan
0 siblings, 1 reply; 5+ messages in thread
From: Sascha Hauer @ 2016-08-18 7:15 UTC (permalink / raw)
To: Alexander Kurz; +Cc: barebox
On Wed, Aug 17, 2016 at 03:12:19PM +0200, Alexander Kurz wrote:
> An MC13892CJ having REV[4:0]=0x14 can be found in the kindle-d01100.
> Add the revision to the list to support this device.
>
> Signed-off-by: Alexander Kurz <akurz@blala.de>
> ---
> drivers/mfd/mc13xxx.c | 1 +
> include/mfd/mc13xxx.h | 13 +++++++------
> 2 files changed, 8 insertions(+), 6 deletions(-)
Applied, thanks
Sascha
>
> diff --git a/drivers/mfd/mc13xxx.c b/drivers/mfd/mc13xxx.c
> index b2fcd95..f6aa922 100644
> --- a/drivers/mfd/mc13xxx.c
> +++ b/drivers/mfd/mc13xxx.c
> @@ -219,6 +219,7 @@ static struct __init {
> { 0x0a, MC13892_REVISION_1_2, "1.2" },
> { 0x10, MC13892_REVISION_2_0, "2.0" },
> { 0x11, MC13892_REVISION_2_1, "2.1" },
> + { 0x14, MC13892_REVISION_2_4, "2.4" },
> { 0x18, MC13892_REVISION_3_0, "3.0" },
> { 0x19, MC13892_REVISION_3_1, "3.1" },
> { 0x1a, MC13892_REVISION_3_2, "3.2" },
> diff --git a/include/mfd/mc13xxx.h b/include/mfd/mc13xxx.h
> index 96a32e4..d351c47 100644
> --- a/include/mfd/mc13xxx.h
> +++ b/include/mfd/mc13xxx.h
> @@ -127,12 +127,13 @@
> #define MC13892_REVISION_2_0 3
> #define MC13892_REVISION_2_0a 4
> #define MC13892_REVISION_2_1 5
> -#define MC13892_REVISION_3_0 6
> -#define MC13892_REVISION_3_1 7
> -#define MC13892_REVISION_3_2 8
> -#define MC13892_REVISION_3_2a 9
> -#define MC13892_REVISION_3_3 10
> -#define MC13892_REVISION_3_5 11
> +#define MC13892_REVISION_2_4 6
> +#define MC13892_REVISION_3_0 7
> +#define MC13892_REVISION_3_1 8
> +#define MC13892_REVISION_3_2 9
> +#define MC13892_REVISION_3_2a 10
> +#define MC13892_REVISION_3_3 11
> +#define MC13892_REVISION_3_5 12
>
> #define MC13783_SWX_VOLTAGE(x) ((x) & 0x3f)
> #define MC13783_SWX_VOLTAGE_DVS(x) (((x) & 0x3f) << 6)
> --
> 2.1.4
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re[2]: [PATCH] mfd mc13xxx: add MC13892_REVISION_2_4
2016-08-18 7:15 ` Sascha Hauer
@ 2016-08-18 7:20 ` Alexander Shiyan
2016-08-18 19:48 ` Alexander Kurz
0 siblings, 1 reply; 5+ messages in thread
From: Alexander Shiyan @ 2016-08-18 7:20 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox, Alexander Kurz
>Четверг, 18 августа 2016, 10:15 +03:00 от Sascha Hauer <s.hauer@pengutronix.de>:
>
>On Wed, Aug 17, 2016 at 03:12:19PM +0200, Alexander Kurz wrote:
>> An MC13892CJ having REV[4:0]=0x14 can be found in the kindle-d01100.
>> Add the revision to the list to support this device.
>>
>> Signed-off-by: Alexander Kurz < akurz@blala.de >
>> ---
>> drivers/mfd/mc13xxx.c | 1 +
>> include/mfd/mc13xxx.h | 13 +++++++------
>> 2 files changed, 8 insertions(+), 6 deletions(-)
...
>> #define MC13892_REVISION_2_03
>> #define MC13892_REVISION_2_0a4
>> #define MC13892_REVISION_2_15
>> -#define MC13892_REVISION_3_06
>> -#define MC13892_REVISION_3_17
>> -#define MC13892_REVISION_3_28
>> -#define MC13892_REVISION_3_2a9
>> -#define MC13892_REVISION_3_310
>> -#define MC13892_REVISION_3_511
>> +#define MC13892_REVISION_2_46
>> +#define MC13892_REVISION_3_07
>> +#define MC13892_REVISION_3_18
>> +#define MC13892_REVISION_3_29
>> +#define MC13892_REVISION_3_2a10
>> +#define MC13892_REVISION_3_311
>> +#define MC13892_REVISION_3_512
Could this be converted to enum?
---
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re[2]: [PATCH] mfd mc13xxx: add MC13892_REVISION_2_4
2016-08-18 7:20 ` Re[2]: " Alexander Shiyan
@ 2016-08-18 19:48 ` Alexander Kurz
2016-08-22 5:26 ` Sascha Hauer
0 siblings, 1 reply; 5+ messages in thread
From: Alexander Kurz @ 2016-08-18 19:48 UTC (permalink / raw)
To: Alexander Shiyan; +Cc: barebox
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1463 bytes --]
On Thu, 18 Aug 2016, Alexander Shiyan wrote:
> >Четверг, 18 августа 2016, 10:15 +03:00 от Sascha Hauer <s.hauer@pengutronix.de>:
> >
> >On Wed, Aug 17, 2016 at 03:12:19PM +0200, Alexander Kurz wrote:
> >> An MC13892CJ having REV[4:0]=0x14 can be found in the kindle-d01100.
> >> Add the revision to the list to support this device.
> >>
> >> Signed-off-by: Alexander Kurz < akurz@blala.de >
> >> ---
> >> drivers/mfd/mc13xxx.c | 1 +
> >> include/mfd/mc13xxx.h | 13 +++++++------
> >> 2 files changed, 8 insertions(+), 6 deletions(-)
> ...
> >> #define MC13892_REVISION_2_03
> >> #define MC13892_REVISION_2_0a4
> >> #define MC13892_REVISION_2_15
> >> -#define MC13892_REVISION_3_06
> >> -#define MC13892_REVISION_3_17
> >> -#define MC13892_REVISION_3_28
> >> -#define MC13892_REVISION_3_2a9
> >> -#define MC13892_REVISION_3_310
> >> -#define MC13892_REVISION_3_511
> >> +#define MC13892_REVISION_2_46
> >> +#define MC13892_REVISION_3_07
> >> +#define MC13892_REVISION_3_18
> >> +#define MC13892_REVISION_3_29
> >> +#define MC13892_REVISION_3_2a10
> >> +#define MC13892_REVISION_3_311
> >> +#define MC13892_REVISION_3_512
>
> Could this be converted to enum?
Personally I also prefer the enum since it enables e.g. gdb
awareness on the enum elements, depending on compiler and usecase
it may offer type and value range safety and in this case, the diff
would be smaller.
Is there a coding policy for barebox regarding macros vs. enums?
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mfd mc13xxx: add MC13892_REVISION_2_4
2016-08-18 19:48 ` Alexander Kurz
@ 2016-08-22 5:26 ` Sascha Hauer
0 siblings, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2016-08-22 5:26 UTC (permalink / raw)
To: Alexander Kurz; +Cc: barebox
On Thu, Aug 18, 2016 at 09:48:21PM +0200, Alexander Kurz wrote:
>
>
> On Thu, 18 Aug 2016, Alexander Shiyan wrote:
>
> > >Четверг, 18 августа 2016, 10:15 +03:00 от Sascha Hauer <s.hauer@pengutronix.de>:
> > >
> > >On Wed, Aug 17, 2016 at 03:12:19PM +0200, Alexander Kurz wrote:
> > >> An MC13892CJ having REV[4:0]=0x14 can be found in the kindle-d01100.
> > >> Add the revision to the list to support this device.
> > >>
> > >> Signed-off-by: Alexander Kurz < akurz@blala.de >
> > >> ---
> > >> drivers/mfd/mc13xxx.c | 1 +
> > >> include/mfd/mc13xxx.h | 13 +++++++------
> > >> 2 files changed, 8 insertions(+), 6 deletions(-)
> > ...
> > >> #define MC13892_REVISION_2_03
> > >> #define MC13892_REVISION_2_0a4
> > >> #define MC13892_REVISION_2_15
> > >> -#define MC13892_REVISION_3_06
> > >> -#define MC13892_REVISION_3_17
> > >> -#define MC13892_REVISION_3_28
> > >> -#define MC13892_REVISION_3_2a9
> > >> -#define MC13892_REVISION_3_310
> > >> -#define MC13892_REVISION_3_511
> > >> +#define MC13892_REVISION_2_46
> > >> +#define MC13892_REVISION_3_07
> > >> +#define MC13892_REVISION_3_18
> > >> +#define MC13892_REVISION_3_29
> > >> +#define MC13892_REVISION_3_2a10
> > >> +#define MC13892_REVISION_3_311
> > >> +#define MC13892_REVISION_3_512
> >
> > Could this be converted to enum?
> Personally I also prefer the enum since it enables e.g. gdb
> awareness on the enum elements, depending on compiler and usecase
> it may offer type and value range safety and in this case, the diff
> would be smaller.
>
> Is there a coding policy for barebox regarding macros vs. enums?
No, not really, but here an enum really looks like a better match.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-08-22 5:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-17 13:12 [PATCH] mfd mc13xxx: add MC13892_REVISION_2_4 Alexander Kurz
2016-08-18 7:15 ` Sascha Hauer
2016-08-18 7:20 ` Re[2]: " Alexander Shiyan
2016-08-18 19:48 ` Alexander Kurz
2016-08-22 5:26 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox