Commit 594f8f88 authored by Rhyland Klein's avatar Rhyland Klein Committed by Anton Vorontsov

tps65090: Setup compatible property for dt

Setup the compatible property so that when this device is registered
through device tree, it can match the expected compatiblity string used in
the tps65090 driver.
Signed-off-by: default avatarRhyland Klein <rklein@nvidia.com>
Signed-off-by: default avatarAnton Vorontsov <anton@enomsg.org>
parent 6b24c9cb
...@@ -168,7 +168,7 @@ static struct tps65090_platform_data * ...@@ -168,7 +168,7 @@ static struct tps65090_platform_data *
tps65090_parse_dt_charger_data(struct platform_device *pdev) tps65090_parse_dt_charger_data(struct platform_device *pdev)
{ {
struct tps65090_platform_data *pdata; struct tps65090_platform_data *pdata;
struct device_node *np = pdev->dev.parent->of_node; struct device_node *np = pdev->dev.of_node;
unsigned int prop; unsigned int prop;
pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
...@@ -195,7 +195,6 @@ static struct tps65090_platform_data * ...@@ -195,7 +195,6 @@ static struct tps65090_platform_data *
static int tps65090_charger_probe(struct platform_device *pdev) static int tps65090_charger_probe(struct platform_device *pdev)
{ {
struct tps65090 *tps65090_mfd = dev_get_drvdata(pdev->dev.parent);
struct tps65090_charger *cdata; struct tps65090_charger *cdata;
struct tps65090_platform_data *pdata; struct tps65090_platform_data *pdata;
uint8_t status1 = 0; uint8_t status1 = 0;
...@@ -204,7 +203,7 @@ static int tps65090_charger_probe(struct platform_device *pdev) ...@@ -204,7 +203,7 @@ static int tps65090_charger_probe(struct platform_device *pdev)
pdata = dev_get_platdata(pdev->dev.parent); pdata = dev_get_platdata(pdev->dev.parent);
if (!pdata && tps65090_mfd->dev->of_node) if (!pdata && pdev->dev.of_node)
pdata = tps65090_parse_dt_charger_data(pdev); pdata = tps65090_parse_dt_charger_data(pdev);
if (!pdata) { if (!pdata) {
...@@ -300,9 +299,15 @@ static int tps65090_charger_remove(struct platform_device *pdev) ...@@ -300,9 +299,15 @@ static int tps65090_charger_remove(struct platform_device *pdev)
return 0; return 0;
} }
static struct of_device_id of_tps65090_charger_match[] = {
{ .compatible = "ti,tps65090-charger", },
{ /* end */ }
};
static struct platform_driver tps65090_charger_driver = { static struct platform_driver tps65090_charger_driver = {
.driver = { .driver = {
.name = "tps65090-charger", .name = "tps65090-charger",
.of_match_table = of_tps65090_charger_match,
.owner = THIS_MODULE, .owner = THIS_MODULE,
}, },
.probe = tps65090_charger_probe, .probe = tps65090_charger_probe,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment