[meego-commits] 8334: Changes to Trunk/kernel
Brian Harring
no_reply at build.meego.com
Tue Oct 12 22:44:46 UTC 2010
Hi,
I have made the following changes to kernel in project Trunk. Please review and accept ASAP.
Thank You,
Brian Harring
[This message was auto-generated]
---
Request #8334:
submit: home:ferringb:branches:Trunk/kernel(r5)(cleanup) -> Trunk/kernel
Message:
BMC #5412 fix to touchscreen. BMC #3944 MFD fix to mfd. BMC #4053, disable mrst_gfx on ivi.
Normally this would go through proper kernel channels, but they're having issues seperate issues unrelated to this, thus bypassing (signed off by the appropriate people in addition)
State: new 2010-10-12T15:44:45 ferringb
Comment: None
changes files:
--------------
--- kernel.changes
+++ kernel.changes
@@ -0,0 +1,3 @@
+* Mon Oct 12 2010 Brian Harring <brian.harring at intel.com> - 2.6.35.3
+- IVI: BMC #5412 fix to touchscreen. BMC #3944 MFD fix to mfd. BMC #4053, disable mrst_gfx on ivi.
+
new:
----
linux-2.6.35-add-platform_data-only-if-non-NULL.patch
linux-2.6.35-tsc2007-fix.patch
spec files:
-----------
other changes:
--------------
++++++ config-ivi
--- config-ivi
+++ config-ivi
@@ -1,5 +1,10 @@
CONFIG_INTEL_MENLOW=y
+CONFIG_MRST_GFX=n
+
+# BMC 4053; mrst_gfx module's probing mishandles russellville's PVR
+CONFIG_DRM_MRST=n
+
#
# Cgroups
#
++++++ linux-2.6.35-add-platform_data-only-if-non-NULL.patch (new)
--- linux-2.6.35-add-platform_data-only-if-non-NULL.patch
+++ linux-2.6.35-add-platform_data-only-if-non-NULL.patch
+From: Brian Harring <brian.harring at intel.com>
+Date: Sun, 3 Oct 2010 18:38:35 -0700
+Subject: [IVI fixes 1/2] add platform_data only if non NULL
+To: meego-kernel at lists.meego.org
+Cc: arjan at linux.intel.com, joel.clark at intel.com
+
+If a NULL or 0 size platform_data is added, the underlying dup results in a pointer into nullspace- meaning drivers can't do null checks for platform_data.
+
+This fixes an oops during probing for drivers/net/ks8842, and drivers/mmc/host/sdhci-pltform when the mfd is timberdale.
+
+This fixes BMC 3944, and is being pushed upstream (http://www.spinics.net/lists/kernel/msg1091752.html).
+
+Resending since there hasn't been any activity on it from Arjan (original cc'd), and since the ml has ate
+the patches twice now.
+---
+ drivers/mfd/mfd-core.c | 13 +++++++++----
+ 1 files changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
+index 1823a57..eee73a8 100644
+--- a/drivers/mfd/mfd-core.c
++++ b/drivers/mfd/mfd-core.c
+@@ -38,10 +38,15 @@ static int mfd_add_device(struct device *parent, int id,
+ pdev->dev.parent = parent;
+ platform_set_drvdata(pdev, cell->driver_data);
+
+- ret = platform_device_add_data(pdev,
+- cell->platform_data, cell->data_size);
+- if (ret)
+- goto fail_res;
++ if (cell->data_size) {
++ ret = platform_device_add_data(pdev,
++ cell->platform_data, cell->data_size);
++ if (ret)
++ goto fail_res;
++ } else {
++ /* potentially nulled already, just being paranoid. */
++ pdev->dev.platform_data = NULL;
++ }
+
+ for (r = 0; r < cell->num_resources; r++) {
+ res[r].name = cell->resources[r].name;
+--
+1.7.2
+
++++++ linux-2.6.35-tsc2007-fix.patch (new)
--- linux-2.6.35-tsc2007-fix.patch
+++ linux-2.6.35-tsc2007-fix.patch
+From: Brian Harring <brian.harring at intel.com>
+Date: Sun, 3 Oct 2010 19:36:12 -0700
+Subject: [IVI fixes 2/2] suppress successive pen down states to avoid false reads
+To: meego-kernel at lists.meego.org
+Cc: arjan at linux.intel.com, joel.clark at intel.com
+
+For the russellville platform, this makes the tsc2007 actually usable.
+
+This patch is pulled directly out of MeeGo 1.0; roughly, after the first successville
+pen down, suppress the next irq since it'll be spurious/noise.
+
+This fixes BMC 5412, and is being pushed upstream (http://www.spinics.net/lists/kernel/msg1091755.html).
+
+Resending since there hasn't been any activity on it from Arjan (original cc'd), and since the ml has ate
+the patches twice now.
+---
+ drivers/input/touchscreen/tsc2007.c | 68 ++++++++++++++++++++++++++---------
+ 1 files changed, 51 insertions(+), 17 deletions(-)
+
+diff --git a/drivers/input/touchscreen/tsc2007.c b/drivers/input/touchscreen/tsc2007.c
+index be23780..05314fd 100644
+--- a/drivers/input/touchscreen/tsc2007.c
++++ b/drivers/input/touchscreen/tsc2007.c
+@@ -29,6 +29,7 @@
+
+ #define TS_POLL_DELAY 1 /* ms delay between samples */
+ #define TS_POLL_PERIOD 1 /* ms delay between samples */
++#define TS_SLOW_POLL_PERIOD 20 /* ms delay between pen down check */
+
+ #define TSC2007_MEASURE_TEMP0 (0x0 << 4)
+ #define TSC2007_MEASURE_AUX (0x2 << 4)
+@@ -77,6 +78,7 @@ struct tsc2007 {
+ u16 x_plate_ohms;
+
+ bool pendown;
++ bool ignore_next_irq;
+ int irq;
+
+ int (*get_pendown_state)(void);
+@@ -228,14 +230,39 @@ static void tsc2007_work(struct work_struct *work)
+ if (ts->pendown)
+ schedule_delayed_work(&ts->work,
+ msecs_to_jiffies(TS_POLL_PERIOD));
+- else
+- enable_irq(ts->irq);
++ else {
++ /* if we don't have the get pen down state callback we
++ * ignore the next IRQ because it is provoked when we checked
++ * the touch pressure.
++ * If the user really touches the screen we will get a new
++ * interrupt anyway so it is safe to ignore it
++ *
++ * This is basically implementing this part of the manual:
++ * "In both cases previously listed, it is recommended that
++ * whenever the host writes to the TSC2007, the master
++ * processor masks the interrupt associated to PENIRQ.
++ * This masking prevents false triggering of interrupts when
++ * the PENIRQ line is disabled in the cases previously listed."
++ */
++ if (!ts->get_pendown_state)
++ ts->ignore_next_irq = true;
++ if (ts->irq)
++ enable_irq(ts->irq);
++ else
++ schedule_delayed_work(&ts->work,
++ msecs_to_jiffies(TS_SLOW_POLL_PERIOD));
++ }
+ }
+
+ static irqreturn_t tsc2007_irq(int irq, void *handle)
+ {
+ struct tsc2007 *ts = handle;
+
++ if (ts->ignore_next_irq) {
++ ts->ignore_next_irq = false;
++ return IRQ_HANDLED;
++ }
++
+ if (!ts->get_pendown_state || likely(ts->get_pendown_state())) {
+ disable_irq_nosync(ts->irq);
+ schedule_delayed_work(&ts->work,
+@@ -250,15 +277,18 @@ static irqreturn_t tsc2007_irq(int irq, void *handle)
+
+ static void tsc2007_free_irq(struct tsc2007 *ts)
+ {
+- free_irq(ts->irq, ts);
+- if (cancel_delayed_work_sync(&ts->work)) {
+- /*
+- * Work was pending, therefore we need to enable
+- * IRQ here to balance the disable_irq() done in the
+- * interrupt handler.
+- */
+- enable_irq(ts->irq);
+- }
++ if (ts->irq) {
++ free_irq(ts->irq, ts);
++ if (cancel_delayed_work_sync(&ts->work)) {
++ /*
++ * Work was pending, therefore we need to enable
++ * IRQ here to balance the disable_irq() done in the
++ * interrupt handler.
++ */
++ enable_irq(ts->irq);
++ }
++ } else
++ cancel_delayed_work_sync(&ts->work);
+ }
+
+ static int __devinit tsc2007_probe(struct i2c_client *client,
+@@ -312,12 +342,16 @@ static int __devinit tsc2007_probe(struct i2c_client *client,
+ if (pdata->init_platform_hw)
+ pdata->init_platform_hw();
+
+- err = request_irq(ts->irq, tsc2007_irq, 0,
+- client->dev.driver->name, ts);
+- if (err < 0) {
+- dev_err(&client->dev, "irq %d busy?\n", ts->irq);
+- goto err_free_mem;
+- }
++
++ if (ts->irq) {
++ err = request_irq(ts->irq, tsc2007_irq, 0,
++ client->dev.driver->name, ts);
++ if (err < 0) {
++ dev_err(&client->dev, "irq %d busy?\n", ts->irq);
++ goto err_free_mem;
++ }
++ } else
++ schedule_delayed_work(&ts->work, TS_SLOW_POLL_PERIOD);
+
+ /* Prepare for touch readings - power down ADC and enable PENIRQ */
+ err = tsc2007_xfer(ts, PWRDOWN);
+--
+1.7.2
+
More information about the MeeGo-commits
mailing list