Skip to content

Commit

Permalink
3.8: merge in all cape changes up to bone51
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
  • Loading branch information
RobertCNelson committed May 14, 2014
1 parent b3f658f commit 565f7e6
Show file tree
Hide file tree
Showing 14 changed files with 9,479 additions and 556 deletions.
2 changes: 2 additions & 0 deletions configs/beaglebone
Expand Up @@ -1309,6 +1309,7 @@ CONFIG_BMP085_I2C=m
# CONFIG_USB_SWITCH_FSA9480 is not set
CONFIG_GPEVT=y
CONFIG_GROVE_I2C=y
CONFIG_TIEQEP=y
# CONFIG_C2PORT is not set

#
Expand Down Expand Up @@ -1338,6 +1339,7 @@ CONFIG_CAPE_BEAGLEBONE=y
CONFIG_CAPE_BEAGLEBONE_GEIGER=y
CONFIG_CAPE_BEAGLEBONE_ARGUS=y
CONFIG_CAPE_BEAGLEBONE_NIXIE=y
CONFIG_CAPE_LOGIBONE_R1=y

#
# SCSI device support
Expand Down
2 changes: 1 addition & 1 deletion patch.sh
Expand Up @@ -24,7 +24,7 @@ EXTERNAL_TREE="git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable
EXTERNAL_BRANCH="linux-3.8.y"
EXTERNAL_SHA="dbf932a9b316d5b29b3e220e5a30e7a165ad2992"

PATCHSET="dma rtc pinctrl cpufreq adc i2c da8xx-fb pwm mmc crypto 6lowpan capebus arm omap omap_sakoman omap_beagle_expansion omap_beagle omap_panda net drm not-capebus pru usb PG2 reboot iio w1 gpmc mxt ssd130x build hdmi audio resetctrl camera resources pmic pps leds capes proto fixes machinekit"
PATCHSET="dma rtc pinctrl cpufreq adc i2c da8xx-fb pwm mmc crypto 6lowpan capebus arm omap omap_sakoman omap_beagle_expansion omap_beagle omap_panda net drm not-capebus pru usb PG2 reboot iio w1 gpmc mxt ssd130x build hdmi audio resetctrl camera resources pmic pps leds capes proto logibone fixes machinekit backports"

git_kernel_stable () {
git pull git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git master --tags || true
Expand Down
6 changes: 3 additions & 3 deletions patches/adc/0017-IIO-ADC-ti_adc-Fix-1st-sample-read.patch
@@ -1,7 +1,7 @@
From 0d45022e9bf73d936ef250fb81a01b9202bc2f47 Mon Sep 17 00:00:00 2001
From 968d605d1bf1b5f170a90470d0fc80baaec93b5b Mon Sep 17 00:00:00 2001
From: "Patil, Rachna" <rachna@ti.com>
Date: Thu, 27 Jun 2013 23:49:41 +0100
Subject: [PATCH 17/21] IIO: ADC: ti_adc: Fix 1st sample read
Subject: [PATCH 17/20] IIO: ADC: ti_adc: Fix 1st sample read

Previously we tried to read data form ADC even before ADC sequencer
finished sampling. This led to wrong samples.
Expand Down Expand Up @@ -114,5 +114,5 @@ index 9598360..17c0cba 100644

struct mfd_tscadc_board {
--
1.7.9.5
1.7.10.4

60 changes: 55 additions & 5 deletions patches/adc/0018-input-ti_tsc-Enable-shared-IRQ-TSC.patch
@@ -1,7 +1,7 @@
From 8b8b3e58bdc34c47a68a5b3c656d6d348f471318 Mon Sep 17 00:00:00 2001
From 67f2bb9789a72863d4ad6cf96a597dfcccbbf8dc Mon Sep 17 00:00:00 2001
From: "Patil, Rachna" <rachna@ti.com>
Date: Fri, 28 Jun 2013 00:45:20 +0100
Subject: [PATCH 18/21] input : ti_tsc : Enable shared IRQ TSC
Subject: [PATCH 18/19] input : ti_tsc : Enable shared IRQ TSC

Touchscreen and ADC share the same IRQ line from parent MFD core.
Previously only Touchscreen was interrupt based.
Expand All @@ -12,8 +12,9 @@ touchscreen.
Signed-off-by: Patil, Rachna <rachna@ti.com>
Acked-by: Vaibhav Hiremath <hvaibhav@ti.com>
---
drivers/input/touchscreen/ti_am335x_tsc.c | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
drivers/input/touchscreen/ti_am335x_tsc.c | 23 +++++++++++++++--------
include/linux/mfd/ti_am335x_tscadc.h | 13 ++++++++++++-
2 files changed, 27 insertions(+), 9 deletions(-)

diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c
index f0acdca..8933c91 100644
Expand Down Expand Up @@ -69,6 +70,55 @@ index f0acdca..8933c91 100644
if (err) {
dev_err(&pdev->dev, "failed to allocate irq.\n");
goto err_free_mem;
diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h
index 17c0cba..3a9c00f 100644
--- a/include/linux/mfd/ti_am335x_tscadc.h
+++ b/include/linux/mfd/ti_am335x_tscadc.h
@@ -46,17 +46,23 @@
/* Step Enable */
#define STEPENB_MASK (0x1FFFF << 0)
#define STEPENB(val) ((val) << 0)
+#define ENB(val) (1 << (val))
+#define STPENB_STEPENB STEPENB(0x1FFFF)
+#define STPENB_STEPENB_TC STEPENB(0x1FFF)

/* IRQ enable */
#define IRQENB_HW_PEN BIT(0)
#define IRQENB_FIFO0THRES BIT(2)
#define IRQENB_FIFO1THRES BIT(5)
#define IRQENB_PENUP BIT(9)
+#define IRQENB_FIFO1OVRRUN BIT(6)
+#define IRQENB_FIFO1UNDRFLW BIT(7)

/* Step Configuration */
#define STEPCONFIG_MODE_MASK (3 << 0)
#define STEPCONFIG_MODE(val) ((val) << 0)
#define STEPCONFIG_MODE_HWSYNC STEPCONFIG_MODE(2)
+#define STEPCONFIG_MODE_SWCNT STEPCONFIG_MODE(1)
#define STEPCONFIG_AVG_MASK (7 << 2)
#define STEPCONFIG_AVG(val) ((val) << 2)
#define STEPCONFIG_AVG_16 STEPCONFIG_AVG(4)
@@ -124,7 +130,8 @@
#define MAX_CLK_DIV 7
#define TOTAL_STEPS 16
#define TOTAL_CHANNELS 8
-
+#define FIFO1_THRESHOLD 19
+#define FIFO_SIZE 64
/*
* ADC runs at 3MHz, and it takes
* 15 cycles to latch one data output.
@@ -159,6 +166,10 @@ struct ti_tscadc_dev {

/* adc device */
struct adc_device *adc;
+
+ /* Context save */
+ unsigned int irqstat;
+ unsigned int ctrl;
};

static inline struct ti_tscadc_dev *ti_tscadc_dev_get(struct platform_device *p)
--
1.7.9.5
1.9.2

@@ -1,29 +1,29 @@
From 5db44aeb51721fe43fca7668508adebb9cca899a Mon Sep 17 00:00:00 2001
From 616716a527a6e9393e0aed38a48ed342bb67e407 Mon Sep 17 00:00:00 2001
From: Pantelis Antoniou <panto@antoniou-consulting.com>
Date: Sat, 27 Jul 2013 13:06:21 +0100
Subject: [PATCH 20/21] iio: ti_am335x_adc: Add IIO map interface
Subject: [PATCH 19/19] iio: ti_am335x_adc: Add IIO map interface

Add an IIO map interface that consumers can use.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
Signed-off-by: Zubair Lutfullah <zubair.lutfullah@gmail.com>
---
drivers/iio/adc/ti_am335x_adc.c | 50 +++++++++++++++++++++++++++++++++++----
drivers/iio/adc/ti_am335x_adc.c | 50 ++++++++++++++++++++++++++++++++++++-----
1 file changed, 45 insertions(+), 5 deletions(-)

diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
index d626508..a172dfb 100644
index f78d2c1..c380142 100644
--- a/drivers/iio/adc/ti_am335x_adc.c
+++ b/drivers/iio/adc/ti_am335x_adc.c
@@ -38,6 +38,7 @@
@@ -33,6 +33,7 @@
struct tiadc_device {
struct ti_tscadc_dev *mfd_tscadc;
int channels;
+ struct iio_map *map;
u8 channel_line[8];
u8 channel_step[8];
struct work_struct poll_work;
@@ -300,13 +301,16 @@ static int tiadc_channel_init(struct iio_dev *indio_dev, int channels)
};
@@ -105,13 +106,16 @@ static int tiadc_channel_init(struct iio_dev *indio_dev, int channels)
struct tiadc_device *adc_dev = iio_priv(indio_dev);
struct iio_chan_spec *chan_array;
struct iio_chan_spec *chan;
Expand All @@ -43,10 +43,10 @@ index d626508..a172dfb 100644

chan = chan_array;
for (i = 0; i < channels; i++, chan++) {
@@ -323,12 +327,44 @@ static int tiadc_channel_init(struct iio_dev *indio_dev, int channels)
}
@@ -128,12 +132,44 @@ static int tiadc_channel_init(struct iio_dev *indio_dev, int channels)

indio_dev->channels = chan_array;

+
+ map = kcalloc(channels + 1, sizeof(struct iio_map), GFP_KERNEL);
+ if (map == NULL) {
Expand Down Expand Up @@ -88,8 +88,8 @@ index d626508..a172dfb 100644
}

static int tiadc_read_raw(struct iio_dev *indio_dev,
@@ -436,8 +472,10 @@ static int tiadc_probe(struct platform_device *pdev)
tiadc_writel(adc_dev, REG_FIFO1THR, FIFO1_THRESHOLD);
@@ -246,12 +282,16 @@ static int tiadc_probe(struct platform_device *pdev)
tiadc_step_config(adc_dev);

err = tiadc_channel_init(indio_dev, adc_dev->channels);
- if (err < 0)
Expand All @@ -98,11 +98,6 @@ index d626508..a172dfb 100644
goto err_free_device;
+ }

INIT_WORK(&adc_dev->poll_work, &tiadc_adc_work);
init_waitqueue_head(&adc_dev->wq_data_avail);
@@ -453,8 +491,10 @@ static int tiadc_probe(struct platform_device *pdev)
goto err_unregister;

err = iio_device_register(indio_dev);
- if (err)
+ if (err) {
Expand All @@ -113,5 +108,5 @@ index d626508..a172dfb 100644
platform_set_drvdata(pdev, indio_dev);

--
1.7.9.5
1.9.2

0 comments on commit 565f7e6

Please sign in to comment.