aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-3.18/0021-enabling-the-realtime-clock-1-wire-chip-DS1307-and-1.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/brcm2708/patches-3.18/0021-enabling-the-realtime-clock-1-wire-chip-DS1307-and-1.patch')
-rw-r--r--[-rwxr-xr-x]target/linux/brcm2708/patches-3.18/0021-enabling-the-realtime-clock-1-wire-chip-DS1307-and-1.patch31
1 files changed, 9 insertions, 22 deletions
diff --git a/target/linux/brcm2708/patches-3.18/0021-enabling-the-realtime-clock-1-wire-chip-DS1307-and-1.patch b/target/linux/brcm2708/patches-3.18/0021-enabling-the-realtime-clock-1-wire-chip-DS1307-and-1.patch
index b2d715c57f..92aaea5f65 100755..100644
--- a/target/linux/brcm2708/patches-3.18/0021-enabling-the-realtime-clock-1-wire-chip-DS1307-and-1.patch
+++ b/target/linux/brcm2708/patches-3.18/0021-enabling-the-realtime-clock-1-wire-chip-DS1307-and-1.patch
@@ -26,8 +26,6 @@ Signed-off-by: Alex J Lennon <ajlennon@dynamicdevices.co.uk>
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 @@
@@ -58,7 +56,7 @@ index 82f56fb..7dd89a7f 100644
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),
};
@@ -97,8 +95,6 @@ index 82f56fb..7dd89a7f 100644
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 @@
@@ -134,7 +130,7 @@ index 1d111e5..61be2cd 100644
#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;
@@ -155,7 +151,7 @@ index 1d111e5..61be2cd 100644
}
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;
}
@@ -175,7 +171,7 @@ index 1d111e5..61be2cd 100644
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;
}
@@ -190,7 +186,7 @@ index 1d111e5..61be2cd 100644
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);
@@ -200,8 +196,6 @@ index 1d111e5..61be2cd 100644
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
@@ -217,11 +211,9 @@ index 56a49ba..881d728 100644
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);
}
@@ -242,11 +234,9 @@ index 47249a3..a4b4a8d 100644
/* 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) {
@@ -261,17 +251,14 @@ index 2820924..fd0550f 100644
+ } 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
-