Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: wm8994: Allow to configure CS/ADDR Pulldown from dts

For designs where CS/ADDR pin is floating, it is useful to
allow dts to define whether to keep internal pull down or not.

Signed-off-by: Alberto Panizzo <alberto@amarulasolutions.com>
Signed-off-by: Anthony Brandon <anthony@amarulasolutions.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Alberto Panizzo and committed by
Lee Jones
4d3e55bc 102370fb

+10
+4
drivers/mfd/wm8994-core.c
··· 304 304 305 305 pdata->spkmode_pu = of_property_read_bool(np, "wlf,spkmode-pu"); 306 306 307 + pdata->csnaddr_pd = of_property_read_bool(np, "wlf,csnaddr-pd"); 308 + 307 309 pdata->ldo[0].enable = of_get_named_gpio(np, "wlf,ldo1ena", 0); 308 310 if (pdata->ldo[0].enable < 0) 309 311 pdata->ldo[0].enable = 0; ··· 564 562 565 563 if (pdata->spkmode_pu) 566 564 pulls |= WM8994_SPKMODE_PU; 565 + if (pdata->csnaddr_pd) 566 + pulls |= WM8994_CSNADDR_PD; 567 567 568 568 /* Disable unneeded pulls */ 569 569 wm8994_set_bits(wm8994, WM8994_PULL_CONTROL_2,
+6
include/linux/mfd/wm8994/pdata.h
··· 222 222 */ 223 223 bool spkmode_pu; 224 224 225 + /* 226 + * CS/ADDR must be pulled internally by the device on this 227 + * system. 228 + */ 229 + bool csnaddr_pd; 230 + 225 231 /** 226 232 * Maximum number of channels clocks will be generated for, 227 233 * useful for systems where and I2S bus with multiple data