Add support for channel selection.
[tas2770sw-android/tas2770sw-android.git] / tas2770-regmap.c
index bee81288d6bb0564fca5f308b2a37a85835c23e2..9afbbd0cd249909b8ac747ee4ab4f82a70dff7dc 100644 (file)
@@ -260,6 +260,24 @@ static int tas2770_parse_dt(struct device *dev, struct tas2770_priv *pTAS2770)
                dev_dbg(pTAS2770->dev, "ti,irq-gpio=%d", pTAS2770->mnIRQGPIO);
        }
 
+       of_property_read_u32(np, "ti,left-slot", &pTAS2770->mnLeftSlot);
+       if (rc) {
+               dev_err(pTAS2770->dev, "Looking up %s property in node %s failed %d\n",
+                       "ti,left-slot", np->full_name, rc);
+       } else {
+               dev_dbg(pTAS2770->dev, "ti,left-slot=%d",
+                       pTAS2770->mnLeftSlot);
+       }
+
+       of_property_read_u32(np, "ti,right-slot", &pTAS2770->mnRightSlot);
+       if (rc) {
+               dev_err(pTAS2770->dev, "Looking up %s property in node %s failed %d\n",
+                       "ti,right-slot", np->full_name, rc);
+       } else {
+               dev_dbg(pTAS2770->dev, "ti,right-slot=%d",
+                       pTAS2770->mnRightSlot);
+       }
+
        return ret;
 }