ti-st: add device tree support

When using device tree, driver configuration data need to be read from
device node.
Add support for getting the platform data information from the device
tree information stored in the .dtb file in case it exists.

Signed-off-by: Eyal Reizer <eyalr@ti.com>
Signed-off-by: bvijay <bvijay@ti.com>
Diff rendering mode:inlineside by side

Signed-off-by: Gigi Joseph <gigi.joseph@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Gigi Joseph
2015-01-09 03:45:02 +00:00
committed by Greg Kroah-Hartman
부모 2e5df413be
커밋 46d0d33350
3개의 변경된 파일105개의 추가작업 그리고 10개의 파일을 삭제

파일 보기

@@ -26,6 +26,7 @@
#include <linux/ti_wilink_st.h>
/**********************************************************************/
/* internal functions */
static void send_ll_cmd(struct st_data_s *st_data,
unsigned char cmd)
@@ -53,7 +54,13 @@ static void ll_device_want_to_sleep(struct st_data_s *st_data)
/* communicate to platform about chip asleep */
kim_data = st_data->kim_data;
pdata = kim_data->kim_pdev->dev.platform_data;
if (kim_data->kim_pdev->dev.of_node) {
pr_debug("use device tree data");
pdata = dt_pdata;
} else {
pdata = kim_data->kim_pdev->dev.platform_data;
}
if (pdata->chip_asleep)
pdata->chip_asleep(NULL);
}
@@ -86,7 +93,13 @@ static void ll_device_want_to_wakeup(struct st_data_s *st_data)
/* communicate to platform about chip wakeup */
kim_data = st_data->kim_data;
pdata = kim_data->kim_pdev->dev.platform_data;
if (kim_data->kim_pdev->dev.of_node) {
pr_debug("use device tree data");
pdata = dt_pdata;
} else {
pdata = kim_data->kim_pdev->dev.platform_data;
}
if (pdata->chip_awake)
pdata->chip_awake(NULL);
}