Thread (40 messages) 40 messages, 9 authors, 2012-01-12
STALE5375d

Revision v1 of 7 in this series.

Revisions (7)
  1. v1 [diff vs current]
  2. v1 [diff vs current]
  3. v1 current
  4. v1 [diff vs current]
  5. v1 [diff vs current]
  6. v1 [diff vs current]
  7. v2 [diff vs current]

[PATCH 4/6] arm/dts: imx6q-sabrelite: add sgtl5000 audio codec

From: Mark Brown <hidden>
Date: 2012-01-08 20:55:05

On Sun, Jan 08, 2012 at 10:52:56PM +0800, Shawn Guo wrote:
On Fri, Jan 06, 2012 at 11:25:41AM +0800, Richard Zhao wrote:
quoted
+					VDDA-supply = <&reg_2P5V>;
+					VDDIO-supply = <&reg_3P3V>;
I would prefer to have them named vdda-supply and vddio-supply.  But
I just learnt that they do not work, because sgtl5000 driver
(sound/soc/codecs/sgtl5000.c) has the supply_names in upper case, while
unlike of_node_cmp() is strcasecmp(), of_prop_cmp() is just strcmp().
But the convention on property name is really all using lower case,
and mixing cases there looks odd, so I'm thinking about the changes
below on of_get_regulator().
        snprintf(prop_name, 32, "%s-supply", supply);
+       while (prop_name[i] && i < 32) {
+               prop_name[i] = tolower(prop_name[i]);
+               i++;
+       }
There's two big problems here.  One is that we clearly shouldn't be
open coding this here but adding a function for it.  The other is that
this is going to break any existing device tree which has upper cased
supplies.  If we were going to do something here I'd go with case
insensitve matching though I'm not sure it's a real problem.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help