drivers/w1/w1_io.c | 18 +++++++++++---
5 files changed, 114 insertions(+), 8 deletions(-)
-diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c
-index 82f56fb..7dd89a7f 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 1d111e5..61be2cd 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" },
-@@ -113,13 +132,15 @@ static int w1_gpio_probe_dt(struct platform_device *pdev)
+@@ -113,13 +132,15 @@ static int w1_gpio_probe_dt(struct platf
static int w1_gpio_probe(struct platform_device *pdev)
{
struct w1_bus_master *master;
}
pdata = dev_get_platdata(&pdev->dev);
-@@ -136,6 +157,19 @@ static int w1_gpio_probe(struct platform_device *pdev)
+@@ -136,6 +157,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");
-@@ -165,6 +199,14 @@ static int w1_gpio_probe(struct platform_device *pdev)
+@@ -165,6 +199,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");
-@@ -195,6 +237,9 @@ static int w1_gpio_remove(struct platform_device *pdev)
+@@ -195,6 +237,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 56a49ba..881d728 100644
--- a/drivers/w1/w1.h
+++ b/drivers/w1/w1.h
@@ -171,6 +171,12 @@ struct w1_bus_master
void (*search)(void *, struct w1_master *,
u8, w1_slave_found_callback);
};
-diff --git a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c
-index 47249a3..a4b4a8d 100644
--- a/drivers/w1/w1_int.c
+++ b/drivers/w1/w1_int.c
-@@ -123,6 +123,20 @@ int w1_add_master_device(struct w1_bus_master *master)
+@@ -123,6 +123,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 2820924..fd0550f 100644
--- a/drivers/w1/w1_io.c
+++ b/drivers/w1/w1_io.c
-@@ -134,10 +134,22 @@ static void w1_pre_write(struct w1_master *dev)
+@@ -134,10 +134,22 @@ static void w1_pre_write(struct w1_maste
static void w1_post_write(struct w1_master *dev)
{
if (dev->pullup_duration) {
+ } else if (dev->bus_master->bitbang_pullup) {
+ dev->bus_master->
+ bitbang_pullup(dev->bus_master->data, 1);
-+ msleep(dev->pullup_duration);
+ msleep(dev->pullup_duration);
+ dev->bus_master->
+ bitbang_pullup(dev->bus_master->data, 0);
+ }
+ } else {
- msleep(dev->pullup_duration);
++ msleep(dev->pullup_duration);
+ }
+
dev->pullup_duration = 0;
}
}
---
-1.8.3.2
-