drivers/w1/w1_io.c | 18 ++++++++++---
5 files changed, 115 insertions(+), 9 deletions(-)
-diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c
-index e892006..221d145 100644
--- a/arch/arm/mach-bcm2708/bcm2708.c
+++ b/arch/arm/mach-bcm2708/bcm2708.c
@@ -32,6 +32,7 @@
static void __init bcm2708_init_led(void);
-@@ -258,6 +266,20 @@ static struct platform_device bcm2708_dmaman_device = {
+@@ -258,6 +266,20 @@ static struct platform_device bcm2708_dm
.num_resources = ARRAY_SIZE(bcm2708_dmaman_resources),
};
module_param(reboot_part, uint, 0644);
+module_param(w1_gpio_pin, uint, 0644);
+module_param(w1_gpio_pullup, uint, 0644);
-diff --git a/drivers/w1/masters/w1-gpio.c b/drivers/w1/masters/w1-gpio.c
-index 9709b8b..b10f9c9 100644
--- a/drivers/w1/masters/w1-gpio.c
+++ b/drivers/w1/masters/w1-gpio.c
@@ -23,6 +23,15 @@
#if defined(CONFIG_OF)
static struct of_device_id w1_gpio_dt_ids[] = {
{ .compatible = "w1-gpio" },
-@@ -102,14 +121,16 @@ static int w1_gpio_probe_dt(struct platform_device *pdev)
+@@ -102,14 +121,16 @@ static int w1_gpio_probe_dt(struct platf
static int w1_gpio_probe(struct platform_device *pdev)
{
struct w1_bus_master *master;
}
}
-@@ -127,6 +148,19 @@ static int w1_gpio_probe(struct platform_device *pdev)
+@@ -127,6 +148,19 @@ static int w1_gpio_probe(struct platform
return -ENOMEM;
}
err = devm_gpio_request(&pdev->dev, pdata->pin, "w1");
if (err) {
dev_err(&pdev->dev, "gpio_request (pin) failed\n");
-@@ -156,6 +190,14 @@ static int w1_gpio_probe(struct platform_device *pdev)
+@@ -156,6 +190,14 @@ static int w1_gpio_probe(struct platform
master->set_pullup = w1_gpio_set_pullup;
}
err = w1_add_master_device(master);
if (err) {
dev_err(&pdev->dev, "w1_add_master device failed\n");
-@@ -186,6 +228,9 @@ static int w1_gpio_remove(struct platform_device *pdev)
+@@ -186,6 +228,9 @@ static int w1_gpio_remove(struct platfor
w1_remove_master_device(master);
return 0;
}
-diff --git a/drivers/w1/w1.h b/drivers/w1/w1.h
-index ca8081a..3392959 100644
--- a/drivers/w1/w1.h
+++ b/drivers/w1/w1.h
@@ -148,6 +148,12 @@ struct w1_bus_master
/** Really nice hardware can handles the different types of ROM search
* w1_master* is passed to the slave found callback.
*/
-diff --git a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c
-index 590bd8a..a4d69b6 100644
--- a/drivers/w1/w1_int.c
+++ b/drivers/w1/w1_int.c
-@@ -118,6 +118,20 @@ int w1_add_master_device(struct w1_bus_master *master)
+@@ -118,6 +118,20 @@ int w1_add_master_device(struct w1_bus_m
return(-EINVAL);
}
/* Lock until the device is added (or not) to w1_masters. */
mutex_lock(&w1_mlock);
/* Search for the first available id (starting at 1). */
-diff --git a/drivers/w1/w1_io.c b/drivers/w1/w1_io.c
-index e10acc2..667fdd5 100644
--- a/drivers/w1/w1_io.c
+++ b/drivers/w1/w1_io.c
-@@ -127,10 +127,22 @@ static void w1_pre_write(struct w1_master *dev)
+@@ -127,10 +127,22 @@ static void w1_pre_write(struct w1_maste
static void w1_post_write(struct w1_master *dev)
{
if (dev->pullup_duration) {
dev->pullup_duration = 0;
}
}
---
-1.9.1
-