* Re: [PATCH v3 2/3] input: touchscreen mc13xxx: Make platform data optional
From: Dmitry Torokhov @ 2019-07-17 3:35 UTC (permalink / raw)
To: Lukasz Majewski
Cc: Lee Jones, linux-kernel, Sascha Hauer, Enrico Weigelt,
Thomas Gleixner, Kate Stewart, linux-input
In-Reply-To: <20190716221929.3782-3-lukma@denx.de>
On Wed, Jul 17, 2019 at 12:19:28AM +0200, Lukasz Majewski wrote:
> From: Sascha Hauer <s.hauer@pengutronix.de>
>
> The platform data once was optional, make it optional again. This
> is a first step towards device tree support for the mc13xxx touchscreen
> driver.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
I suppose it will go together with the 1st patch through Lee's MFD tree?
Thanks.
--
Dmitry
^ permalink raw reply
* [PATCH v3 3/3] input: touchscreen mc13xxx: Add mc34708 support
From: Lukasz Majewski @ 2019-07-16 22:19 UTC (permalink / raw)
To: Lee Jones
Cc: linux-kernel, Dmitry Torokhov, Sascha Hauer, Enrico Weigelt,
Thomas Gleixner, Kate Stewart, linux-input, Lukasz Majewski
In-Reply-To: <20190716221929.3782-1-lukma@denx.de>
From: Sascha Hauer <s.hauer@pengutronix.de>
The mc34708 has a different bit to enable pen detection. This
adds the driver data and devtype necessary to probe the device
and to distinguish between the mc13783 and the mc34708.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
Changes for v3:
- Replace forward declaration of mc13xxx_driver_data with
structure definition
- Rename mc13xxx_driver_data with mc13xxx_chip
- Move static struct mc13xxx_chip mc13783_chip and mc34708_chip
closer to ID table
- Do not check mc13xxx device type
Changes for v2:
- Change nested if statements to a single one (with cr0 > ...)
- Replace hardcoded max resistance value (4080) with a generic driver data
value.
- Introduce new include/linux/mfd/mc34708.h header file for mc34708 specific
defines
- Define as driver data mask and value for accessing mc13xxx registers
Changes from the original patch:
- Simplify the mcXXXXX_set_pen_detection functions
- Fix checkpatch warnings
---
drivers/input/touchscreen/mc13783_ts.c | 56 +++++++++++++++++++++++++++++++---
1 file changed, 52 insertions(+), 4 deletions(-)
diff --git a/drivers/input/touchscreen/mc13783_ts.c b/drivers/input/touchscreen/mc13783_ts.c
index edd49e44e0c9..857c11235141 100644
--- a/drivers/input/touchscreen/mc13783_ts.c
+++ b/drivers/input/touchscreen/mc13783_ts.c
@@ -10,6 +10,7 @@
*/
#include <linux/platform_device.h>
#include <linux/mfd/mc13783.h>
+#include <linux/mfd/mc34708.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/input.h>
@@ -30,6 +31,18 @@ MODULE_PARM_DESC(sample_tolerance,
"is supposed to be wrong and is discarded. Set to 0 to "
"disable this check.");
+enum mc13xxx_type {
+ MC13XXX_TYPE_MC13783,
+ MC13XXX_TYPE_MC34708,
+};
+
+struct mc13xxx_chip {
+ enum mc13xxx_type type;
+ int max_resistance;
+ u32 reg_mask;
+ u32 reg_value;
+};
+
struct mc13783_ts_priv {
struct input_dev *idev;
struct mc13xxx *mc13xxx;
@@ -37,6 +50,7 @@ struct mc13783_ts_priv {
unsigned int sample[4];
u8 ato;
bool atox;
+ const struct mc13xxx_chip *chip;
};
static irqreturn_t mc13783_ts_handler(int irq, void *data)
@@ -93,6 +107,9 @@ static void mc13783_ts_report_sample(struct mc13783_ts_priv *priv)
cr0 = (cr0 + cr1) / 2;
+ if (cr0 > priv->chip->max_resistance)
+ cr0 = 0;
+
if (!cr0 || !sample_tolerance ||
(x2 - x0 < sample_tolerance &&
y2 - y0 < sample_tolerance)) {
@@ -102,14 +119,14 @@ static void mc13783_ts_report_sample(struct mc13783_ts_priv *priv)
input_report_abs(idev, ABS_Y, y1);
dev_dbg(&idev->dev, "report (%d, %d, %d)\n",
- x1, y1, 0x1000 - cr0);
+ x1, y1, priv->chip->max_resistance - cr0);
schedule_delayed_work(&priv->work, HZ / 50);
} else {
dev_dbg(&idev->dev, "report release\n");
}
input_report_abs(idev, ABS_PRESSURE,
- cr0 ? 0x1000 - cr0 : cr0);
+ cr0 ? priv->chip->max_resistance - cr0 : 0);
input_report_key(idev, BTN_TOUCH, cr0);
input_sync(idev);
} else {
@@ -146,7 +163,8 @@ static int mc13783_ts_open(struct input_dev *dev)
goto out;
ret = mc13xxx_reg_rmw(priv->mc13xxx, MC13XXX_ADC0,
- MC13XXX_ADC0_TSMOD_MASK, MC13XXX_ADC0_TSMOD0);
+ priv->chip->reg_mask,
+ priv->chip->reg_value);
if (ret)
mc13xxx_irq_free(priv->mc13xxx, MC13XXX_IRQ_TS, priv);
out:
@@ -160,7 +178,7 @@ static void mc13783_ts_close(struct input_dev *dev)
mc13xxx_lock(priv->mc13xxx);
mc13xxx_reg_rmw(priv->mc13xxx, MC13XXX_ADC0,
- MC13XXX_ADC0_TSMOD_MASK, 0);
+ priv->chip->reg_mask, 0);
mc13xxx_irq_free(priv->mc13xxx, MC13XXX_IRQ_TS, priv);
mc13xxx_unlock(priv->mc13xxx);
@@ -172,6 +190,7 @@ static int __init mc13783_ts_probe(struct platform_device *pdev)
struct mc13783_ts_priv *priv;
struct mc13xxx_ts_platform_data *pdata = dev_get_platdata(&pdev->dev);
struct input_dev *idev;
+ const struct platform_device_id *id = platform_get_device_id(pdev);
int ret = -ENOMEM;
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
@@ -182,6 +201,7 @@ static int __init mc13783_ts_probe(struct platform_device *pdev)
INIT_DELAYED_WORK(&priv->work, mc13783_ts_work);
priv->mc13xxx = dev_get_drvdata(pdev->dev.parent);
priv->idev = idev;
+ priv->chip = (void *)id->driver_data;
if (pdata) {
priv->atox = pdata->atox;
@@ -228,7 +248,35 @@ static int mc13783_ts_remove(struct platform_device *pdev)
return 0;
}
+static struct mc13xxx_chip mc13783_chip = {
+ .type = MC13XXX_TYPE_MC13783,
+ .max_resistance = 4096,
+ .reg_mask = MC13XXX_ADC0_TSMOD_MASK,
+ .reg_value = MC13XXX_ADC0_TSMOD0,
+};
+
+static struct mc13xxx_chip mc34708_chip = {
+ .type = MC13XXX_TYPE_MC34708,
+ .max_resistance = 4080,
+ .reg_mask = MC34708_ADC0_TSMASK,
+ .reg_value = MC34708_ADC0_TSPENDETEN,
+};
+
+static const struct platform_device_id mc13xxx_ts_idtable[] = {
+ {
+ .name = "mc13783-ts",
+ .driver_data = (kernel_ulong_t)&mc13783_chip,
+ }, {
+ .name = "mc34708-ts",
+ .driver_data = (kernel_ulong_t)&mc34708_chip,
+ }, {
+ /* sentinel */
+ }
+};
+MODULE_DEVICE_TABLE(platform, mc13xxx_ts_idtable);
+
static struct platform_driver mc13783_ts_driver = {
+ .id_table = mc13xxx_ts_idtable,
.remove = mc13783_ts_remove,
.driver = {
.name = MC13783_TS_NAME,
--
2.11.0
^ permalink raw reply related
* [PATCH v3 2/3] input: touchscreen mc13xxx: Make platform data optional
From: Lukasz Majewski @ 2019-07-16 22:19 UTC (permalink / raw)
To: Lee Jones
Cc: linux-kernel, Dmitry Torokhov, Sascha Hauer, Enrico Weigelt,
Thomas Gleixner, Kate Stewart, linux-input, Lukasz Majewski
In-Reply-To: <20190716221929.3782-1-lukma@denx.de>
From: Sascha Hauer <s.hauer@pengutronix.de>
The platform data once was optional, make it optional again. This
is a first step towards device tree support for the mc13xxx touchscreen
driver.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
Changes for v3:
- None
Changes for v2:
- None
Changes from the original patch:
- Commit message typo fixes
---
drivers/input/touchscreen/mc13783_ts.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/input/touchscreen/mc13783_ts.c b/drivers/input/touchscreen/mc13783_ts.c
index ae0d978c83bf..edd49e44e0c9 100644
--- a/drivers/input/touchscreen/mc13783_ts.c
+++ b/drivers/input/touchscreen/mc13783_ts.c
@@ -35,7 +35,8 @@ struct mc13783_ts_priv {
struct mc13xxx *mc13xxx;
struct delayed_work work;
unsigned int sample[4];
- struct mc13xxx_ts_platform_data *touch;
+ u8 ato;
+ bool atox;
};
static irqreturn_t mc13783_ts_handler(int irq, void *data)
@@ -125,7 +126,7 @@ static void mc13783_ts_work(struct work_struct *work)
if (mc13xxx_adc_do_conversion(priv->mc13xxx,
mode, channel,
- priv->touch->ato, priv->touch->atox,
+ priv->ato, priv->atox,
priv->sample) == 0)
mc13783_ts_report_sample(priv);
}
@@ -169,6 +170,7 @@ static void mc13783_ts_close(struct input_dev *dev)
static int __init mc13783_ts_probe(struct platform_device *pdev)
{
struct mc13783_ts_priv *priv;
+ struct mc13xxx_ts_platform_data *pdata = dev_get_platdata(&pdev->dev);
struct input_dev *idev;
int ret = -ENOMEM;
@@ -180,11 +182,10 @@ static int __init mc13783_ts_probe(struct platform_device *pdev)
INIT_DELAYED_WORK(&priv->work, mc13783_ts_work);
priv->mc13xxx = dev_get_drvdata(pdev->dev.parent);
priv->idev = idev;
- priv->touch = dev_get_platdata(&pdev->dev);
- if (!priv->touch) {
- dev_err(&pdev->dev, "missing platform data\n");
- ret = -ENODEV;
- goto err_free_mem;
+
+ if (pdata) {
+ priv->atox = pdata->atox;
+ priv->ato = pdata->ato;
}
idev->name = MC13783_TS_NAME;
--
2.11.0
^ permalink raw reply related
* [PATCH v3 1/3] mfd: mc13xxx: Add mc34708 adc support
From: Lukasz Majewski @ 2019-07-16 22:19 UTC (permalink / raw)
To: Lee Jones
Cc: linux-kernel, Dmitry Torokhov, Sascha Hauer, Enrico Weigelt,
Thomas Gleixner, Kate Stewart, linux-input, Lukasz Majewski
In-Reply-To: <20190716221929.3782-1-lukma@denx.de>
From: Sascha Hauer <s.hauer@pengutronix.de>
The mc34708 has an improved adc. The older variants will always convert
a fixed order of channels. The mc34708 can do up to eight conversions
in arbitrary channel order. Currently this extended feature is not
supported. We only support touchscreen conversions now, which will
be sampled in a data format compatible to the older chips in order
to keep the API between the mfd and the touchscreen driver.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
Changes for v3:
- None
Changes for v2:
- Change the return code patch when the mc13xxx ADC is performing conversion
- Introduce new include/linux/mfd/mc34708.h header file for mc34708 specific
defines
Changes from the original patches:
- ADC conversion functions prototypes added to fix build error
- Adjustments to make checkpatch clean (-ENOSYS, line over 80 char)
This patch applies on top of v5.2 - SHA1: 0ecfebd2b52404ae0c54a878c872bb93363ada36
---
drivers/mfd/mc13xxx-core.c | 102 +++++++++++++++++++++++++++++++++++++++++++-
drivers/mfd/mc13xxx.h | 3 ++
include/linux/mfd/mc34708.h | 37 ++++++++++++++++
3 files changed, 141 insertions(+), 1 deletion(-)
create mode 100644 include/linux/mfd/mc34708.h
diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c
index 1abe7432aad8..01473d6fda21 100644
--- a/drivers/mfd/mc13xxx-core.c
+++ b/drivers/mfd/mc13xxx-core.c
@@ -12,6 +12,7 @@
#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/mfd/core.h>
+#include <linux/mfd/mc34708.h>
#include "mc13xxx.h"
@@ -45,6 +46,8 @@
#define MC13XXX_ADC2 45
+#define MC13XXX_ADC_WORKING (1 << 0)
+
void mc13xxx_lock(struct mc13xxx *mc13xxx)
{
if (!mutex_trylock(&mc13xxx->lock)) {
@@ -198,22 +201,30 @@ static void mc34708_print_revision(struct mc13xxx *mc13xxx, u32 revision)
maskval(revision, MC34708_REVISION_FAB));
}
+static int mc13xxx_adc_conversion(struct mc13xxx *, unsigned int,
+ unsigned int, u8, bool, unsigned int *);
+static int mc34708_adc_conversion(struct mc13xxx *, unsigned int,
+ unsigned int, u8, bool, unsigned int *);
+
/* These are only exported for mc13xxx-i2c and mc13xxx-spi */
struct mc13xxx_variant mc13xxx_variant_mc13783 = {
.name = "mc13783",
.print_revision = mc13xxx_print_revision,
+ .adc_do_conversion = mc13xxx_adc_conversion,
};
EXPORT_SYMBOL_GPL(mc13xxx_variant_mc13783);
struct mc13xxx_variant mc13xxx_variant_mc13892 = {
.name = "mc13892",
.print_revision = mc13xxx_print_revision,
+ .adc_do_conversion = mc13xxx_adc_conversion,
};
EXPORT_SYMBOL_GPL(mc13xxx_variant_mc13892);
struct mc13xxx_variant mc13xxx_variant_mc34708 = {
.name = "mc34708",
.print_revision = mc34708_print_revision,
+ .adc_do_conversion = mc34708_adc_conversion,
};
EXPORT_SYMBOL_GPL(mc13xxx_variant_mc34708);
@@ -249,7 +260,7 @@ static irqreturn_t mc13xxx_handler_adcdone(int irq, void *data)
#define MC13XXX_ADC_WORKING (1 << 0)
-int mc13xxx_adc_do_conversion(struct mc13xxx *mc13xxx, unsigned int mode,
+static int mc13xxx_adc_conversion(struct mc13xxx *mc13xxx, unsigned int mode,
unsigned int channel, u8 ato, bool atox,
unsigned int *sample)
{
@@ -358,6 +369,95 @@ int mc13xxx_adc_do_conversion(struct mc13xxx *mc13xxx, unsigned int mode,
return ret;
}
+
+static int mc34708_adc_conversion(struct mc13xxx *mc13xxx, unsigned int mode,
+ unsigned int channel, u8 ato, bool atox,
+ unsigned int *sample)
+{
+ int ret, i;
+ u32 adc0, adc3, adc1, old_adc0;
+ struct mc13xxx_adcdone_data adcdone_data = {
+ .mc13xxx = mc13xxx,
+ };
+
+ switch (mode) {
+ case MC13XXX_ADC_MODE_TS:
+ adc0 = MC34708_ADC0_TSEN | MC34708_ADC0_TSSTART |
+ MC34708_ADC0_TSSTOP(7);
+
+ adc1 = MC34708_ADC1_TSDLY1(0xf) |
+ MC34708_ADC1_TSDLY2(0xf) |
+ MC34708_ADC1_TSDLY3(0xf);
+
+ adc3 = MC34708_ADC3_TSSEL(0, MC34708_TS_X) |
+ MC34708_ADC3_TSSEL(1, MC34708_TS_Y) |
+ MC34708_ADC3_TSSEL(2, MC34708_TS_X) |
+ MC34708_ADC3_TSSEL(3, MC34708_TS_Y) |
+ MC34708_ADC3_TSSEL(4, MC34708_TS_X) |
+ MC34708_ADC3_TSSEL(5, MC34708_TS_R) |
+ MC34708_ADC3_TSSEL(6, MC34708_TS_Y) |
+ MC34708_ADC3_TSSEL(7, MC34708_TS_R);
+ break;
+
+ case MC13XXX_ADC_MODE_SINGLE_CHAN:
+ case MC13XXX_ADC_MODE_MULT_CHAN:
+ default:
+ return -EINVAL;
+ }
+
+ init_completion(&adcdone_data.done);
+
+ mc13xxx_lock(mc13xxx);
+
+ if (mc13xxx->adcflags & MC13XXX_ADC_WORKING) {
+ mc13xxx_unlock(mc13xxx);
+ return -EBUSY;
+ }
+
+ mc13xxx->adcflags |= MC13XXX_ADC_WORKING;
+
+ mc13xxx_reg_read(mc13xxx, MC13XXX_ADC0, &old_adc0);
+
+ mc13xxx_irq_request(mc13xxx, MC34708_IRQ_TSDONE,
+ mc13xxx_handler_adcdone, __func__, &adcdone_data);
+ mc13xxx_irq_ack(mc13xxx, MC34708_IRQ_TSDONE);
+
+ mc13xxx_reg_write(mc13xxx, MC34708_ADC3, adc3);
+ mc13xxx_reg_write(mc13xxx, MC13XXX_ADC1, adc1);
+ mc13xxx_reg_write(mc13xxx, MC13XXX_ADC0, adc0);
+
+ mc13xxx_unlock(mc13xxx);
+
+ ret = wait_for_completion_interruptible_timeout(&adcdone_data.done, HZ);
+
+ mc13xxx_lock(mc13xxx);
+
+ mc13xxx_irq_free(mc13xxx, MC34708_IRQ_TSDONE, &adcdone_data);
+
+ if (!ret) {
+ ret = -ETIMEDOUT;
+ goto out;
+ }
+
+ for (i = 0; i < 4; i++)
+ mc13xxx_reg_read(mc13xxx, MC34708_ADC4 + i, &sample[i]);
+
+out:
+ ret = mc13xxx_reg_write(mc13xxx, MC13XXX_ADC0, old_adc0);
+
+ mc13xxx->adcflags &= ~MC13XXX_ADC_WORKING;
+ mc13xxx_unlock(mc13xxx);
+
+ return ret;
+}
+
+int mc13xxx_adc_do_conversion(struct mc13xxx *mc13xxx, unsigned int mode,
+ unsigned int channel, u8 ato, bool atox,
+ unsigned int *sample)
+{
+ return mc13xxx->variant->adc_do_conversion(mc13xxx, mode, channel, ato,
+ atox, sample);
+}
EXPORT_SYMBOL_GPL(mc13xxx_adc_do_conversion);
static int mc13xxx_add_subdevice_pdata(struct mc13xxx *mc13xxx,
diff --git a/drivers/mfd/mc13xxx.h b/drivers/mfd/mc13xxx.h
index ce6eec52e8eb..0a79fbb8bcb4 100644
--- a/drivers/mfd/mc13xxx.h
+++ b/drivers/mfd/mc13xxx.h
@@ -19,6 +19,9 @@ struct mc13xxx;
struct mc13xxx_variant {
const char *name;
void (*print_revision)(struct mc13xxx *mc13xxx, u32 revision);
+ int (*adc_do_conversion)(struct mc13xxx *mc13xxx, unsigned int mode,
+ unsigned int channel, u8 ato, bool atox,
+ unsigned int *sample);
};
extern struct mc13xxx_variant
diff --git a/include/linux/mfd/mc34708.h b/include/linux/mfd/mc34708.h
new file mode 100644
index 000000000000..c812104dc53d
--- /dev/null
+++ b/include/linux/mfd/mc34708.h
@@ -0,0 +1,37 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (C) 2019
+ * Lukasz Majewski, DENX Software Engineering, lukma@denx.de
+ */
+#ifndef __LINUX_MFD_MC34708_H
+#define __LINUX_MFD_MC34708_H
+
+#define MC34708_ADC3 46
+#define MC34708_ADC4 47
+
+#define MC34708_IRQ_TSDONE 1
+
+#define MC34708_ADC0_TSEN BIT(12)
+#define MC34708_ADC0_TSSTART BIT(13)
+#define MC34708_ADC0_TSCONT BIT(14)
+#define MC34708_ADC0_TSHOLD BIT(15)
+#define MC34708_ADC0_TSPENDETEN BIT(20)
+
+#define MC34708_ADC0_TSMASK (MC34708_ADC0_TSPENDETEN | \
+ MC34708_ADC0_TSEN | \
+ MC34708_ADC0_TSSTART | \
+ MC34708_ADC0_TSCONT | \
+ MC34708_ADC0_TSHOLD)
+
+#define MC34708_ADC0_TSSTOP(x) (((x) & 0x7) << 16)
+
+#define MC34708_ADC3_TSSEL(step, ch) ((ch) << (8 + 2 * (step)))
+#define MC34708_ADC1_TSDLY1(d) ((d) << 12)
+#define MC34708_ADC1_TSDLY2(d) ((d) << 16)
+#define MC34708_ADC1_TSDLY3(d) ((d) << 20)
+
+#define MC34708_TS_X 1
+#define MC34708_TS_Y 2
+#define MC34708_TS_R 3
+
+#endif /* __LINUX_MFD_MC34708_H */
--
2.11.0
^ permalink raw reply related
* [PATCH v3 0/3] mfd: mc13xxx: Fixes and enhancements for NXP's mc34708
From: Lukasz Majewski @ 2019-07-16 22:19 UTC (permalink / raw)
To: Lee Jones
Cc: linux-kernel, Dmitry Torokhov, Sascha Hauer, Enrico Weigelt,
Thomas Gleixner, Kate Stewart, linux-input, Lukasz Majewski
This patch set provides several enhancements to mc13xxx MFD family
of devices by introducing mc34708 as a separate device.
This IC has dedicated pen detection feature, which allows better
touchscreen experience.
This is the third version of this code (v3).
Discussion regarding v1 can be found here:
https://lkml.org/lkml/2018/4/12/351
https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1661934.html
https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1664296.html
Sascha Hauer (3):
mfd: mc13xxx: Add mc34708 adc support
input: touchscreen mc13xxx: Make platform data optional
input: touchscreen mc13xxx: Add mc34708 support
drivers/input/touchscreen/mc13783_ts.c | 71 +++++++++++++++++++----
drivers/mfd/mc13xxx-core.c | 102 ++++++++++++++++++++++++++++++++-
drivers/mfd/mc13xxx.h | 3 +
include/linux/mfd/mc34708.h | 37 ++++++++++++
4 files changed, 201 insertions(+), 12 deletions(-)
create mode 100644 include/linux/mfd/mc34708.h
--
2.11.0
^ permalink raw reply
* Re: [PATCH] Input: i8042 - disable KBD port on Late-2016 Razer Blade Stealth
From: Dmitry Torokhov @ 2019-07-16 20:28 UTC (permalink / raw)
To: David Laight
Cc: 'Lyude Paul', stable@vger.kernel.org, Chen-Yu Tsai,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
In-Reply-To: <28dc38a55c45467dad6f11e9ea459172@AcuMS.aculab.com>
On Mon, Apr 08, 2019 at 09:55:00AM +0000, David Laight wrote:
> From: Lyude Paul
> > Sent: 07 April 2019 23:55
> > On Sun, 2019-04-07 at 15:10 -0700, Dmitry Torokhov wrote:
> > > Hi Lyude,
> > >
> > > On Sun, Apr 07, 2019 at 05:37:34PM -0400, Lyude Paul wrote:
> > > > The late 2016 model of the Razer Blade Stealth has a built-in USB
> > > > keyboard, but for some reason the BIOS exposes an i8042 controller with
> > > > a connected KBD port. While this fake AT Keyboard device doesn't appear
> > > > to report any events, attempting to change the state of the caps lock
> > > > LED on it from on to off causes the entire system to hang.
> > > >
> > > > So, introduce a quirk table for disabling keyboard probing by default,
> > > > i8042_dmi_nokbd_table, and add this specific model of Razer laptop to
> > > > that table.
> > >
> > > What does dmesg show about i8042 for this device? Especially line "PNP:
> > > PS/2 Controller ..."?
> > >
> >
> > Apr 07 18:42:46 malachite kernel: i8042: PNP: No PS/2 controller found.
> > Apr 07 18:42:46 malachite kernel: i8042: Probing ports directly.
> > Apr 07 18:42:46 malachite kernel: serio: i8042 KBD port at 0x60,0x64 irq 1
> > Apr 07 18:42:46 malachite kernel: serio: i8042 AUX port at 0x60,0x64 irq 12
> > Apr 07 18:42:46 malachite kernel: mousedev: PS/2 mouse device common for all mice
>
> That is the 'default' probe of the ps/2 serial ports.
> Looks like the BIOS is correct in not exposing the ps/2 controller.
> Usually they just fail to expose the mouse when it needs a ps/2 splitter :-(
>
> I do wonder what they've connected it to though.
> It is extremely unlikely they've found an x86 chipset that doesn't
> have the ps/2 serial ports at the standard io addresses.
I wonder if it is time to start trusting BIOS if it was released maybe
in Win7+ timeframe?
Thanks.
--
Dmitry
^ permalink raw reply
* Re: [PATCH v2 2/2] input: soc_button_array for newer surface devices
From: Dmitry Torokhov @ 2019-07-16 20:18 UTC (permalink / raw)
To: Maximilian Luz
Cc: linux-kernel, linux-input, platform-driver-x86, Hans de Goede,
Chen Yu, Darren Hart, Andy Shevchenko, Benjamin Tissoires
In-Reply-To: <92e13b01-7353-1430-fb38-b5098d509da2@gmail.com>
On Tue, Jul 16, 2019 at 08:19:04PM +0200, Maximilian Luz wrote:
>
> Hi,
>
> On 7/16/19 9:21 AM, Dmitry Torokhov wrote:
> > When you are saying that Pro 4 and later models use different
> > notifications, does this mean that Pro 4 does not define any GPIOs?
>
> Unfortunately, at least the Surface Book (first generation, buttons are
> handled the same way as on the Pro 4) has GPIOs defined in MSHW0040, but
> they are for different use. Specifically: They can detect if the
> clipboard (screen part of the device, the device basically has two parts
> that can be separated: clipboard and base) is being removed. Relying on
> the GPIOs was my first idea too, but that has been reported to shut down
> the Book 1 when the clipboard is detached.
>
> As far as I know, the OEM platform revision check is the easiest way to
> differentiate between those devices.
OK, fair enough. By the way, I see you are adding some #ifdef
CONFIG_ACPI and stubbing out new functions, but the driver does not
really work without ACPI (acpi_match_device() will fail in this case I
would think and that will cause probe() to abort). So maybe we just add
depends on ACPI to the driver's Kconfig entry?
Thanks.
--
Dmitry
^ permalink raw reply
* Re: [PATCH v7 2/2] Input: add Apple SPI keyboard and trackpad driver.
From: Dmitry Torokhov @ 2019-07-16 18:47 UTC (permalink / raw)
To: Ronald Tschalär
Cc: Henrik Rydberg, Andy Shevchenko, Andrzej Hajda, Inki Dae,
Greg Kroah-Hartman, Lukas Wunner, Federico Lorenzi,
Laurent Pinchart, linux-input, dri-devel, linux-kernel
In-Reply-To: <20190419081926.13567-3-ronald@innovation.ch>
Hi Ronald,
On Fri, Apr 19, 2019 at 01:19:26AM -0700, Ronald Tschalär wrote:
> The keyboard and trackpad on recent MacBook's (since 8,1) and
> MacBookPro's (13,* and 14,*) are attached to an SPI controller instead
> of USB, as previously. The higher level protocol is not publicly
> documented and hence has been reverse engineered. As a consequence there
> are still a number of unknown fields and commands. However, the known
> parts have been working well and received extensive testing and use.
>
> In order for this driver to work, the proper SPI drivers need to be
> loaded too; for MB8,1 these are spi_pxa2xx_platform and spi_pxa2xx_pci;
> for all others they are spi_pxa2xx_platform and intel_lpss_pci. For this
> reason enabling this driver in the config implies enabling the above
> drivers.
I applied the patch (but changed __u8 to u8 as that's preferred form for
inside the kernel, and added error handling for input_mt_init_slots) but
we need to do some more work on the driver.
My main issue is with registering touchpad device asynchronously,
independent from the probe() function. This means (as far as I can tell)
that any error is not really appropriately handled (as by that time it
is too late to signal errors from probe()) and devm functions are not
going to be called, leaving remnants of the resources in memory on
driver unload. It also brings in issues with suspend/resume (what
happens if you suspend really quickly while device is not registered
yet?), etc, etc.
Can we switch to calling DEV_INFO command synchronously from probe()? If
we are concerned about it taking relatively long time we can always
annotate the driver as having probe_type = PROBE_PREFER_ASYNCHRONOUS so
that other devices can be probed simultaneously with applespi.
Thanks.
--
Dmitry
^ permalink raw reply
* Re: [PATCH] Input: psmouse - Fix build error of multiple definition
From: Dmitry Torokhov @ 2019-07-16 18:19 UTC (permalink / raw)
To: YueHaibing; +Cc: allison, tglx, info, dilinger, linux-kernel, linux-input
In-Reply-To: <20190716065411.56780-1-yuehaibing@huawei.com>
On Tue, Jul 16, 2019 at 02:54:11PM +0800, YueHaibing wrote:
> trackpoint_detect() should be static inline while
> CONFIG_MOUSE_PS2_TRACKPOINT is not set. otherwire,we
> got building fails:
>
> drivers/input/mouse/alps.o: In function `trackpoint_detect':
> alps.c:(.text+0x8e00): multiple definition of `trackpoint_detect'
> drivers/input/mouse/psmouse-base.o:psmouse-base.c:(.text+0x1b50): first defined here
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: 55e3d9224b60 ("Input: psmouse - allow disabing certain protocol extensions")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Applied, thank you.
> ---
> drivers/input/mouse/trackpoint.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/input/mouse/trackpoint.h b/drivers/input/mouse/trackpoint.h
> index 0afffe8..77110f3 100644
> --- a/drivers/input/mouse/trackpoint.h
> +++ b/drivers/input/mouse/trackpoint.h
> @@ -158,7 +158,8 @@ struct trackpoint_data {
> #ifdef CONFIG_MOUSE_PS2_TRACKPOINT
> int trackpoint_detect(struct psmouse *psmouse, bool set_properties);
> #else
> -inline int trackpoint_detect(struct psmouse *psmouse, bool set_properties)
> +static inline int trackpoint_detect(struct psmouse *psmouse,
> + bool set_properties)
> {
> return -ENOSYS;
> }
> --
> 2.7.4
>
>
--
Dmitry
^ permalink raw reply
* Re: [PATCH v2 2/2] input: soc_button_array for newer surface devices
From: Maximilian Luz @ 2019-07-16 18:19 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: linux-kernel, linux-input, platform-driver-x86, Hans de Goede,
Chen Yu, Darren Hart, Andy Shevchenko, Benjamin Tissoires
In-Reply-To: <20190716072135.GA806@penguin>
Hi,
On 7/16/19 9:21 AM, Dmitry Torokhov wrote:
> When you are saying that Pro 4 and later models use different
> notifications, does this mean that Pro 4 does not define any GPIOs?
Unfortunately, at least the Surface Book (first generation, buttons are
handled the same way as on the Pro 4) has GPIOs defined in MSHW0040, but
they are for different use. Specifically: They can detect if the
clipboard (screen part of the device, the device basically has two parts
that can be separated: clipboard and base) is being removed. Relying on
the GPIOs was my first idea too, but that has been reported to shut down
the Book 1 when the clipboard is detached.
As far as I know, the OEM platform revision check is the easiest way to
differentiate between those devices.
> I do not believe -EAGAIN has any special meaning in the driver core;
I think I got the -EAGAIN from an outdated LWN article when I first
started working on this, thanks for confirming.
> also when the GPIO controller is not ready gpiod_get() will return
> -EPROBE_DEFER, which is the prober way if signalling that some resource
> is not yet available and probe should be retries at a later time.
>
> Moreover, I do not believe that gpiod_count() needs GPIO controller to
> be ready, the count is taken from board firmware or static board file
> definition, so if gpiod_count() returns 0 it should be clear indication
> that the driver should not be used with the device.
Thank you for this insight, I will update the patch accordingly.
Maximilian
^ permalink raw reply
* Re: [PATCH -next] keyboard: remove set but not used variables 'sts'
From: Dmitry Torokhov @ 2019-07-16 18:17 UTC (permalink / raw)
To: Mao Wenan; +Cc: linux-input, linux-kernel, kernel-janitors
In-Reply-To: <20190716085423.19443-1-maowenan@huawei.com>
On Tue, Jul 16, 2019 at 04:54:23PM +0800, Mao Wenan wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/input/keyboard/applespi.c: In function applespi_set_bl_level:
> drivers/input/keyboard/applespi.c:902:6: warning: variable sts set but not used [-Wunused-but-set-variable]
>
> Fixes: b426ac0452093d ("Input: add Apple SPI keyboard and trackpad driver")
>
> Signed-off-by: Mao Wenan <maowenan@huawei.com>
Applied, thank you.
> ---
> drivers/input/keyboard/applespi.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/input/keyboard/applespi.c b/drivers/input/keyboard/applespi.c
> index c1a6843..548737e 100644
> --- a/drivers/input/keyboard/applespi.c
> +++ b/drivers/input/keyboard/applespi.c
> @@ -899,7 +899,6 @@ static void applespi_set_bl_level(struct led_classdev *led_cdev,
> struct applespi_data *applespi =
> container_of(led_cdev, struct applespi_data, backlight_info);
> unsigned long flags;
> - int sts;
>
> spin_lock_irqsave(&applespi->cmd_msg_lock, flags);
>
> @@ -916,7 +915,7 @@ static void applespi_set_bl_level(struct led_classdev *led_cdev,
> KBD_BL_LEVEL_MIN);
> }
>
> - sts = applespi_send_cmd_msg(applespi);
> + applespi_send_cmd_msg(applespi);
>
> spin_unlock_irqrestore(&applespi->cmd_msg_lock, flags);
> }
> --
> 2.7.4
>
--
Dmitry
^ permalink raw reply
* Re: [PATCH 02/12] Documentation/arm: repointer docs to Documentation/arch/arm
From: Krzysztof Kozlowski @ 2019-07-16 14:51 UTC (permalink / raw)
To: Alex Shi
Cc: linux-doc, Jonathan Corbet, linux-kernel, linux-stm32,
linux-arm-kernel, linuxppc-dev, linux-riscv, linux-omap,
linux-fbdev, linux-samsung-soc@vger.kernel.org, linux-ia64,
linux-mips, linux-parisc, linux-scsi, linux-s390, kvm, linux-sh,
Kukjin Kim, linux-crypto, linux-input, linux-serial
In-Reply-To: <20190712022018.27989-2-alex.shi@linux.alibaba.com>
On Fri, 12 Jul 2019 at 04:20, Alex Shi <alex.shi@linux.alibaba.com> wrote:
>
> Since we move 'arm/arm64' docs to Documentation/arch/{arm,arm64} dir,
> redirect the doc pointer to them.
>
> Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: linux-doc@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-samsung-soc@vger.kernel.org
> Cc: linux-crypto@vger.kernel.org
> Cc: linux-input@vger.kernel.org
> Cc: linux-serial@vger.kernel.org
> ---
> Documentation/arch/arm/Samsung-S3C24XX/GPIO.txt | 2 +-
> .../arch/arm/Samsung-S3C24XX/Overview.txt | 6 +++---
> Documentation/arch/arm/Samsung/GPIO.txt | 2 +-
> Documentation/arch/arm/Samsung/Overview.txt | 4 ++--
> Documentation/devicetree/bindings/arm/xen.txt | 2 +-
> Documentation/devicetree/booting-without-of.txt | 4 ++--
> Documentation/translations/zh_CN/arm/Booting | 4 ++--
> .../translations/zh_CN/arm/kernel_user_helpers.txt | 4 ++--
> MAINTAINERS | 6 +++---
I assume it will go through doc tree, so for Samsung:
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Best regards,
Krzysztof
^ permalink raw reply
* [PATCH 13/14] docs: remove extra conf.py files
From: Mauro Carvalho Chehab @ 2019-07-16 12:10 UTC (permalink / raw)
Cc: Mauro Carvalho Chehab, Jonathan Corbet, Herbert Xu,
David S. Miller, Maarten Lankhorst, Maxime Ripard, Sean Paul,
David Airlie, Daniel Vetter, Dmitry Torokhov, Yoshinori Sato,
Rich Felker, Jaroslav Kysela, Takashi Iwai, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, H. Peter Anvin, x86, linux-doc,
linux-crypto, dri
In-Reply-To: <cover.1563277838.git.mchehab+samsung@kernel.org>
Now that the latex_documents are handled automatically, we can
remove those extra conf.py files.
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
Documentation/admin-guide/conf.py | 10 ----------
Documentation/core-api/conf.py | 10 ----------
Documentation/crypto/conf.py | 10 ----------
Documentation/dev-tools/conf.py | 10 ----------
Documentation/doc-guide/conf.py | 10 ----------
Documentation/driver-api/80211/conf.py | 10 ----------
Documentation/driver-api/conf.py | 10 ----------
Documentation/driver-api/pm/conf.py | 10 ----------
Documentation/filesystems/conf.py | 10 ----------
Documentation/gpu/conf.py | 10 ----------
Documentation/input/conf.py | 10 ----------
Documentation/kernel-hacking/conf.py | 10 ----------
Documentation/maintainer/conf.py | 10 ----------
Documentation/media/conf.py | 12 ------------
Documentation/networking/conf.py | 10 ----------
Documentation/process/conf.py | 10 ----------
Documentation/sh/conf.py | 10 ----------
Documentation/sound/conf.py | 10 ----------
Documentation/userspace-api/conf.py | 10 ----------
Documentation/vm/conf.py | 10 ----------
Documentation/x86/conf.py | 10 ----------
21 files changed, 212 deletions(-)
delete mode 100644 Documentation/admin-guide/conf.py
delete mode 100644 Documentation/core-api/conf.py
delete mode 100644 Documentation/crypto/conf.py
delete mode 100644 Documentation/dev-tools/conf.py
delete mode 100644 Documentation/doc-guide/conf.py
delete mode 100644 Documentation/driver-api/80211/conf.py
delete mode 100644 Documentation/driver-api/conf.py
delete mode 100644 Documentation/driver-api/pm/conf.py
delete mode 100644 Documentation/filesystems/conf.py
delete mode 100644 Documentation/gpu/conf.py
delete mode 100644 Documentation/input/conf.py
delete mode 100644 Documentation/kernel-hacking/conf.py
delete mode 100644 Documentation/maintainer/conf.py
delete mode 100644 Documentation/media/conf.py
delete mode 100644 Documentation/networking/conf.py
delete mode 100644 Documentation/process/conf.py
delete mode 100644 Documentation/sh/conf.py
delete mode 100644 Documentation/sound/conf.py
delete mode 100644 Documentation/userspace-api/conf.py
delete mode 100644 Documentation/vm/conf.py
delete mode 100644 Documentation/x86/conf.py
diff --git a/Documentation/admin-guide/conf.py b/Documentation/admin-guide/conf.py
deleted file mode 100644
index 86f738953799..000000000000
--- a/Documentation/admin-guide/conf.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- coding: utf-8; mode: python -*-
-
-project = 'Linux Kernel User Documentation'
-
-tags.add("subproject")
-
-latex_documents = [
- ('index', 'linux-user.tex', 'Linux Kernel User Documentation',
- 'The kernel development community', 'manual'),
-]
diff --git a/Documentation/core-api/conf.py b/Documentation/core-api/conf.py
deleted file mode 100644
index db1f7659f3da..000000000000
--- a/Documentation/core-api/conf.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- coding: utf-8; mode: python -*-
-
-project = "Core-API Documentation"
-
-tags.add("subproject")
-
-latex_documents = [
- ('index', 'core-api.tex', project,
- 'The kernel development community', 'manual'),
-]
diff --git a/Documentation/crypto/conf.py b/Documentation/crypto/conf.py
deleted file mode 100644
index 4335d251ddf3..000000000000
--- a/Documentation/crypto/conf.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- coding: utf-8; mode: python -*-
-
-project = 'Linux Kernel Crypto API'
-
-tags.add("subproject")
-
-latex_documents = [
- ('index', 'crypto-api.tex', 'Linux Kernel Crypto API manual',
- 'The kernel development community', 'manual'),
-]
diff --git a/Documentation/dev-tools/conf.py b/Documentation/dev-tools/conf.py
deleted file mode 100644
index 7faafa3f7888..000000000000
--- a/Documentation/dev-tools/conf.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- coding: utf-8; mode: python -*-
-
-project = "Development tools for the kernel"
-
-tags.add("subproject")
-
-latex_documents = [
- ('index', 'dev-tools.tex', project,
- 'The kernel development community', 'manual'),
-]
diff --git a/Documentation/doc-guide/conf.py b/Documentation/doc-guide/conf.py
deleted file mode 100644
index fd3731182d5a..000000000000
--- a/Documentation/doc-guide/conf.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- coding: utf-8; mode: python -*-
-
-project = 'Linux Kernel Documentation Guide'
-
-tags.add("subproject")
-
-latex_documents = [
- ('index', 'kernel-doc-guide.tex', 'Linux Kernel Documentation Guide',
- 'The kernel development community', 'manual'),
-]
diff --git a/Documentation/driver-api/80211/conf.py b/Documentation/driver-api/80211/conf.py
deleted file mode 100644
index 4424b4b0b9c3..000000000000
--- a/Documentation/driver-api/80211/conf.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- coding: utf-8; mode: python -*-
-
-project = "Linux 802.11 Driver Developer's Guide"
-
-tags.add("subproject")
-
-latex_documents = [
- ('index', '80211.tex', project,
- 'The kernel development community', 'manual'),
-]
diff --git a/Documentation/driver-api/conf.py b/Documentation/driver-api/conf.py
deleted file mode 100644
index 202726d20088..000000000000
--- a/Documentation/driver-api/conf.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- coding: utf-8; mode: python -*-
-
-project = "The Linux driver implementer's API guide"
-
-tags.add("subproject")
-
-latex_documents = [
- ('index', 'driver-api.tex', project,
- 'The kernel development community', 'manual'),
-]
diff --git a/Documentation/driver-api/pm/conf.py b/Documentation/driver-api/pm/conf.py
deleted file mode 100644
index a89fac11272f..000000000000
--- a/Documentation/driver-api/pm/conf.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- coding: utf-8; mode: python -*-
-
-project = "Device Power Management"
-
-tags.add("subproject")
-
-latex_documents = [
- ('index', 'pm.tex', project,
- 'The kernel development community', 'manual'),
-]
diff --git a/Documentation/filesystems/conf.py b/Documentation/filesystems/conf.py
deleted file mode 100644
index ea44172af5c4..000000000000
--- a/Documentation/filesystems/conf.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- coding: utf-8; mode: python -*-
-
-project = "Linux Filesystems API"
-
-tags.add("subproject")
-
-latex_documents = [
- ('index', 'filesystems.tex', project,
- 'The kernel development community', 'manual'),
-]
diff --git a/Documentation/gpu/conf.py b/Documentation/gpu/conf.py
deleted file mode 100644
index 1757b040fb32..000000000000
--- a/Documentation/gpu/conf.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- coding: utf-8; mode: python -*-
-
-project = "Linux GPU Driver Developer's Guide"
-
-tags.add("subproject")
-
-latex_documents = [
- ('index', 'gpu.tex', project,
- 'The kernel development community', 'manual'),
-]
diff --git a/Documentation/input/conf.py b/Documentation/input/conf.py
deleted file mode 100644
index d2352fdc92ed..000000000000
--- a/Documentation/input/conf.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- coding: utf-8; mode: python -*-
-
-project = "The Linux input driver subsystem"
-
-tags.add("subproject")
-
-latex_documents = [
- ('index', 'linux-input.tex', project,
- 'The kernel development community', 'manual'),
-]
diff --git a/Documentation/kernel-hacking/conf.py b/Documentation/kernel-hacking/conf.py
deleted file mode 100644
index 3d8acf0f33ad..000000000000
--- a/Documentation/kernel-hacking/conf.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- coding: utf-8; mode: python -*-
-
-project = "Kernel Hacking Guides"
-
-tags.add("subproject")
-
-latex_documents = [
- ('index', 'kernel-hacking.tex', project,
- 'The kernel development community', 'manual'),
-]
diff --git a/Documentation/maintainer/conf.py b/Documentation/maintainer/conf.py
deleted file mode 100644
index 81e9eb7a7884..000000000000
--- a/Documentation/maintainer/conf.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- coding: utf-8; mode: python -*-
-
-project = 'Linux Kernel Development Documentation'
-
-tags.add("subproject")
-
-latex_documents = [
- ('index', 'maintainer.tex', 'Linux Kernel Development Documentation',
- 'The kernel development community', 'manual'),
-]
diff --git a/Documentation/media/conf.py b/Documentation/media/conf.py
deleted file mode 100644
index 1f194fcd2cae..000000000000
--- a/Documentation/media/conf.py
+++ /dev/null
@@ -1,12 +0,0 @@
-# -*- coding: utf-8; mode: python -*-
-
-# SPDX-License-Identifier: GPL-2.0
-
-project = 'Linux Media Subsystem Documentation'
-
-tags.add("subproject")
-
-latex_documents = [
- ('index', 'media.tex', 'Linux Media Subsystem Documentation',
- 'The kernel development community', 'manual'),
-]
diff --git a/Documentation/networking/conf.py b/Documentation/networking/conf.py
deleted file mode 100644
index 40f69e67a883..000000000000
--- a/Documentation/networking/conf.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- coding: utf-8; mode: python -*-
-
-project = "Linux Networking Documentation"
-
-tags.add("subproject")
-
-latex_documents = [
- ('index', 'networking.tex', project,
- 'The kernel development community', 'manual'),
-]
diff --git a/Documentation/process/conf.py b/Documentation/process/conf.py
deleted file mode 100644
index 1b01a80ad9ce..000000000000
--- a/Documentation/process/conf.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- coding: utf-8; mode: python -*-
-
-project = 'Linux Kernel Development Documentation'
-
-tags.add("subproject")
-
-latex_documents = [
- ('index', 'process.tex', 'Linux Kernel Development Documentation',
- 'The kernel development community', 'manual'),
-]
diff --git a/Documentation/sh/conf.py b/Documentation/sh/conf.py
deleted file mode 100644
index 1eb684a13ac8..000000000000
--- a/Documentation/sh/conf.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- coding: utf-8; mode: python -*-
-
-project = "SuperH architecture implementation manual"
-
-tags.add("subproject")
-
-latex_documents = [
- ('index', 'sh.tex', project,
- 'The kernel development community', 'manual'),
-]
diff --git a/Documentation/sound/conf.py b/Documentation/sound/conf.py
deleted file mode 100644
index 3f1fc5e74e7b..000000000000
--- a/Documentation/sound/conf.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- coding: utf-8; mode: python -*-
-
-project = "Linux Sound Subsystem Documentation"
-
-tags.add("subproject")
-
-latex_documents = [
- ('index', 'sound.tex', project,
- 'The kernel development community', 'manual'),
-]
diff --git a/Documentation/userspace-api/conf.py b/Documentation/userspace-api/conf.py
deleted file mode 100644
index 2eaf59f844e5..000000000000
--- a/Documentation/userspace-api/conf.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- coding: utf-8; mode: python -*-
-
-project = "The Linux kernel user-space API guide"
-
-tags.add("subproject")
-
-latex_documents = [
- ('index', 'userspace-api.tex', project,
- 'The kernel development community', 'manual'),
-]
diff --git a/Documentation/vm/conf.py b/Documentation/vm/conf.py
deleted file mode 100644
index 3b0b601af558..000000000000
--- a/Documentation/vm/conf.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- coding: utf-8; mode: python -*-
-
-project = "Linux Memory Management Documentation"
-
-tags.add("subproject")
-
-latex_documents = [
- ('index', 'memory-management.tex', project,
- 'The kernel development community', 'manual'),
-]
diff --git a/Documentation/x86/conf.py b/Documentation/x86/conf.py
deleted file mode 100644
index 33c5c3142e20..000000000000
--- a/Documentation/x86/conf.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- coding: utf-8; mode: python -*-
-
-project = "X86 architecture specific documentation"
-
-tags.add("subproject")
-
-latex_documents = [
- ('index', 'x86.tex', project,
- 'The kernel development community', 'manual'),
-]
--
2.21.0
^ permalink raw reply related
* [PATCH 00/14] pending doc patches for 5.3-rc
From: Mauro Carvalho Chehab @ 2019-07-16 12:10 UTC (permalink / raw)
Cc: Mauro Carvalho Chehab, linux-scsi, esc.storagedev, linuxppc-dev,
Jonathan Corbet, alsa-devel, kvm, linux-i2c, rcu, linux-pm,
linux-doc, devicetree, linux-arch, linux-arm-kernel,
linux-watchdog, x86, dri-devel, netdev, linux-crypto, linux-sh,
linux-input, linux-pci
Those are the pending documentation patches after my pull request
for this branch:
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media.git tags/docs/v5.3-1
Patches 1 to 13 were already submitted, but got rebased. Patch 14
is a new fixup one.
Patches 1 and 2 weren't submitted before due to merge conflicts
that are now solved upstream;
Patch 3 fixes a series of random Documentation/* references that
are pointing to the wrong places.
Patch 4 fix a longstanding issue: every time a new book is added,
conf.py need changes, in order to allow generating a PDF file.
After the patch, conf.py will automatically recognize new books,
saving the trouble of keeping adding documents to it.
Patches 5 to 11 are due to fonts support when building translations.pdf.
The main focus is to add xeCJK support. While doing it, I discovered
some bugs at sphinx-pre-install script after running it with 7 different
distributions.
Patch 12 improves support for partial doc building. Currently, each
subdir needs to have its own conf.py, in order to support partial
doc build. After it, any Documentation subdir can be used to
roduce html/pdf docs with:
make SPHINXDIRS="foo bar" htmldocs
(or pdfdocs, latexdocs, epubdocs, ...)
Patch 13 is a cleanup patch: it simply get rid of all those extra
conf.py files that aren't needed anymore. The only extra config
file after it is this one:
Documentation/media/conf_nitpick.py
With enables some extra optional Sphinx features.
Patch 14 adds Documentation/virtual to the main index.rst file
and add a new *.rst file that was orphaned there.
-
After this series, there's just one more patch meant to be applied
for 5.3, with is still waiting for some patches to be merged from
linux-next:
https://git.linuxtv.org/mchehab/experimental.git/commit/?id=b1b5dc7d7bbfbbfdace2a248c6458301c6e34100
Mauro Carvalho Chehab (14):
docs: powerpc: convert docs to ReST and rename to *.rst
docs: power: add it to to the main documentation index
docs: fix broken doc references due to renames
docs: pdf: add all Documentation/*/index.rst to PDF output
docs: conf.py: add CJK package needed by translations
docs: conf.py: only use CJK if the font is available
scripts/sphinx-pre-install: fix script for RHEL/CentOS
scripts/sphinx-pre-install: don't use LaTeX with CentOS 7
scripts/sphinx-pre-install: fix latexmk dependencies
scripts/sphinx-pre-install: cleanup Gentoo checks
scripts/sphinx-pre-install: seek for Noto CJK fonts for pdf output
docs: load_config.py: avoid needing a conf.py just due to LaTeX docs
docs: remove extra conf.py files
docs: virtual: add it to the documentation body
Documentation/PCI/pci-error-recovery.rst | 5 +-
Documentation/RCU/rculist_nulls.txt | 2 +-
Documentation/admin-guide/conf.py | 10 --
Documentation/conf.py | 30 +++-
Documentation/core-api/conf.py | 10 --
Documentation/crypto/conf.py | 10 --
Documentation/dev-tools/conf.py | 10 --
.../devicetree/bindings/arm/idle-states.txt | 2 +-
Documentation/doc-guide/conf.py | 10 --
Documentation/driver-api/80211/conf.py | 10 --
Documentation/driver-api/conf.py | 10 --
Documentation/driver-api/pm/conf.py | 10 --
Documentation/filesystems/conf.py | 10 --
Documentation/gpu/conf.py | 10 --
Documentation/index.rst | 3 +
Documentation/input/conf.py | 10 --
Documentation/kernel-hacking/conf.py | 10 --
Documentation/locking/spinlocks.rst | 4 +-
Documentation/maintainer/conf.py | 10 --
Documentation/media/conf.py | 12 --
Documentation/memory-barriers.txt | 2 +-
Documentation/networking/conf.py | 10 --
Documentation/power/index.rst | 2 +-
.../{bootwrapper.txt => bootwrapper.rst} | 28 +++-
.../{cpu_families.txt => cpu_families.rst} | 23 +--
.../{cpu_features.txt => cpu_features.rst} | 6 +-
Documentation/powerpc/{cxl.txt => cxl.rst} | 46 ++++--
.../powerpc/{cxlflash.txt => cxlflash.rst} | 10 +-
.../{DAWR-POWER9.txt => dawr-power9.rst} | 15 +-
Documentation/powerpc/{dscr.txt => dscr.rst} | 18 +-
...ecovery.txt => eeh-pci-error-recovery.rst} | 108 ++++++------
...ed-dump.txt => firmware-assisted-dump.rst} | 117 +++++++------
Documentation/powerpc/{hvcs.txt => hvcs.rst} | 108 ++++++------
Documentation/powerpc/index.rst | 34 ++++
Documentation/powerpc/isa-versions.rst | 15 +-
.../powerpc/{mpc52xx.txt => mpc52xx.rst} | 12 +-
...nv.txt => pci_iov_resource_on_powernv.rst} | 15 +-
.../powerpc/{pmu-ebb.txt => pmu-ebb.rst} | 1 +
Documentation/powerpc/ptrace.rst | 156 ++++++++++++++++++
Documentation/powerpc/ptrace.txt | 151 -----------------
.../{qe_firmware.txt => qe_firmware.rst} | 37 +++--
.../{syscall64-abi.txt => syscall64-abi.rst} | 29 ++--
...al_memory.txt => transactional_memory.rst} | 45 ++---
Documentation/process/conf.py | 10 --
Documentation/sh/conf.py | 10 --
Documentation/sound/conf.py | 10 --
Documentation/sphinx/load_config.py | 27 ++-
.../translations/ko_KR/memory-barriers.txt | 2 +-
Documentation/userspace-api/conf.py | 10 --
Documentation/virtual/kvm/index.rst | 1 +
Documentation/vm/conf.py | 10 --
Documentation/watchdog/hpwdt.rst | 2 +-
Documentation/x86/conf.py | 10 --
MAINTAINERS | 14 +-
arch/powerpc/kernel/exceptions-64s.S | 2 +-
drivers/gpu/drm/drm_modes.c | 2 +-
drivers/i2c/busses/i2c-nvidia-gpu.c | 2 +-
drivers/scsi/hpsa.c | 4 +-
drivers/soc/fsl/qe/qe.c | 2 +-
drivers/tty/hvc/hvcs.c | 2 +-
include/soc/fsl/qe/qe.h | 2 +-
scripts/sphinx-pre-install | 118 ++++++++++---
62 files changed, 738 insertions(+), 678 deletions(-)
delete mode 100644 Documentation/admin-guide/conf.py
delete mode 100644 Documentation/core-api/conf.py
delete mode 100644 Documentation/crypto/conf.py
delete mode 100644 Documentation/dev-tools/conf.py
delete mode 100644 Documentation/doc-guide/conf.py
delete mode 100644 Documentation/driver-api/80211/conf.py
delete mode 100644 Documentation/driver-api/conf.py
delete mode 100644 Documentation/driver-api/pm/conf.py
delete mode 100644 Documentation/filesystems/conf.py
delete mode 100644 Documentation/gpu/conf.py
delete mode 100644 Documentation/input/conf.py
delete mode 100644 Documentation/kernel-hacking/conf.py
delete mode 100644 Documentation/maintainer/conf.py
delete mode 100644 Documentation/media/conf.py
delete mode 100644 Documentation/networking/conf.py
rename Documentation/powerpc/{bootwrapper.txt => bootwrapper.rst} (93%)
rename Documentation/powerpc/{cpu_families.txt => cpu_families.rst} (95%)
rename Documentation/powerpc/{cpu_features.txt => cpu_features.rst} (97%)
rename Documentation/powerpc/{cxl.txt => cxl.rst} (95%)
rename Documentation/powerpc/{cxlflash.txt => cxlflash.rst} (98%)
rename Documentation/powerpc/{DAWR-POWER9.txt => dawr-power9.rst} (95%)
rename Documentation/powerpc/{dscr.txt => dscr.rst} (91%)
rename Documentation/powerpc/{eeh-pci-error-recovery.txt => eeh-pci-error-recovery.rst} (82%)
rename Documentation/powerpc/{firmware-assisted-dump.txt => firmware-assisted-dump.rst} (80%)
rename Documentation/powerpc/{hvcs.txt => hvcs.rst} (91%)
create mode 100644 Documentation/powerpc/index.rst
rename Documentation/powerpc/{mpc52xx.txt => mpc52xx.rst} (91%)
rename Documentation/powerpc/{pci_iov_resource_on_powernv.txt => pci_iov_resource_on_powernv.rst} (97%)
rename Documentation/powerpc/{pmu-ebb.txt => pmu-ebb.rst} (99%)
create mode 100644 Documentation/powerpc/ptrace.rst
delete mode 100644 Documentation/powerpc/ptrace.txt
rename Documentation/powerpc/{qe_firmware.txt => qe_firmware.rst} (95%)
rename Documentation/powerpc/{syscall64-abi.txt => syscall64-abi.rst} (82%)
rename Documentation/powerpc/{transactional_memory.txt => transactional_memory.rst} (93%)
delete mode 100644 Documentation/process/conf.py
delete mode 100644 Documentation/sh/conf.py
delete mode 100644 Documentation/sound/conf.py
delete mode 100644 Documentation/userspace-api/conf.py
delete mode 100644 Documentation/vm/conf.py
delete mode 100644 Documentation/x86/conf.py
--
2.21.0
^ permalink raw reply
* [PATCH -next] keyboard: remove set but not used variables 'sts'
From: Mao Wenan @ 2019-07-16 8:54 UTC (permalink / raw)
To: dmitry.torokhov; +Cc: linux-input, linux-kernel, kernel-janitors, Mao Wenan
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/input/keyboard/applespi.c: In function applespi_set_bl_level:
drivers/input/keyboard/applespi.c:902:6: warning: variable sts set but not used [-Wunused-but-set-variable]
Fixes: b426ac0452093d ("Input: add Apple SPI keyboard and trackpad driver")
Signed-off-by: Mao Wenan <maowenan@huawei.com>
---
drivers/input/keyboard/applespi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/input/keyboard/applespi.c b/drivers/input/keyboard/applespi.c
index c1a6843..548737e 100644
--- a/drivers/input/keyboard/applespi.c
+++ b/drivers/input/keyboard/applespi.c
@@ -899,7 +899,6 @@ static void applespi_set_bl_level(struct led_classdev *led_cdev,
struct applespi_data *applespi =
container_of(led_cdev, struct applespi_data, backlight_info);
unsigned long flags;
- int sts;
spin_lock_irqsave(&applespi->cmd_msg_lock, flags);
@@ -916,7 +915,7 @@ static void applespi_set_bl_level(struct led_classdev *led_cdev,
KBD_BL_LEVEL_MIN);
}
- sts = applespi_send_cmd_msg(applespi);
+ applespi_send_cmd_msg(applespi);
spin_unlock_irqrestore(&applespi->cmd_msg_lock, flags);
}
--
2.7.4
^ permalink raw reply related
* Re: [PATCH 3/5] Input: s3c2410_ts: Use devm_platform_ioremap_resource()
From: Dmitry Torokhov @ 2019-07-16 7:39 UTC (permalink / raw)
To: Mukesh Ojha
Cc: shawnguo, s.hauer, linux-imx, linux-input, linux-arm-kernel,
linux-kernel
In-Reply-To: <1554362243-2888-4-git-send-email-mojha@codeaurora.org>
Hi Mukesh,
On Thu, Apr 04, 2019 at 12:47:21PM +0530, Mukesh Ojha wrote:
> devm_platform_ioremap_resource() internally have platform_get_resource()
> and devm_ioremap_resource() in it. So instead of calling them separately
> use devm_platform_ioremap_resource() directly.
>
> Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
> ---
> drivers/input/touchscreen/s3c2410_ts.c | 10 +---------
> 1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c
> index 1173890..e11cdae 100644
> --- a/drivers/input/touchscreen/s3c2410_ts.c
> +++ b/drivers/input/touchscreen/s3c2410_ts.c
> @@ -242,7 +242,6 @@ static int s3c2410ts_probe(struct platform_device *pdev)
> struct s3c2410_ts_mach_info *info;
> struct device *dev = &pdev->dev;
> struct input_dev *input_dev;
> - struct resource *res;
> int ret = -EINVAL;
>
> /* Initialise input stuff */
> @@ -277,14 +276,7 @@ static int s3c2410ts_probe(struct platform_device *pdev)
> goto err_clk;
> }
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - if (!res) {
> - dev_err(dev, "no resource for registers\n");
> - ret = -ENOENT;
> - goto err_clk;
> - }
> -
> - ts.io = ioremap(res->start, resource_size(res));
> + ts.io = devm_platform_ioremap_resource(pdev, 0);
This is not an equivalent transformation: the original code (rightly or
wrongly) did not request the memory regions described by 'res' while new
variant does.
Also you can't simply slap a single devm resource in a driver that does
not use managed resources as it messes up the release order.
--
Dmitry
^ permalink raw reply
* [PATCH] hid-logitech-dj: add the Powerplay receiver
From: Filipe Laíns @ 2019-07-16 7:37 UTC (permalink / raw)
Cc: nlopezcasad, Filipe Laíns, Jiri Kosina, Benjamin Tissoires,
linux-input, linux-kernel
Signed-off-by: Filipe Laíns <lains@archlinux.org>
---
drivers/hid/hid-ids.h | 1 +
drivers/hid/hid-logitech-dj.c | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index ab9d382b067d..884356feb016 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -769,6 +769,7 @@
#define USB_DEVICE_ID_LOGITECH_UNIFYING_RECEIVER_2 0xc532
#define USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_2 0xc534
#define USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_LIGHTSPEED 0xc539
+#define USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_POWERPLAY 0xc53a
#define USB_DEVICE_ID_SPACETRAVELLER 0xc623
#define USB_DEVICE_ID_SPACENAVIGATOR 0xc626
#define USB_DEVICE_ID_DINOVO_DESKTOP 0xc704
diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
index 4334acb49129..d5b47ec1510c 100644
--- a/drivers/hid/hid-logitech-dj.c
+++ b/drivers/hid/hid-logitech-dj.c
@@ -1839,6 +1839,10 @@ static const struct hid_device_id logi_dj_receivers[] = {
{ /* Logitech 27 MHz HID++ 1.0 receiver (0xc513) */
HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_MX3000_RECEIVER),
.driver_data = recvr_type_27mhz},
+ { /* Logitech powerplay receiver (0xc53a) */
+ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,
+ USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_POWERPLAY),
+ .driver_data = recvr_type_gaming_hidpp},
{ /* Logitech 27 MHz HID++ 1.0 receiver (0xc517) */
HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,
USB_DEVICE_ID_S510_RECEIVER_2),
--
2.22.0
^ permalink raw reply related
* [PATCH] hid-logitech-hidpp: add USB PID for some mice
From: Filipe Laíns @ 2019-07-16 7:37 UTC (permalink / raw)
Cc: nlopezcasad, Filipe Laíns, Jiri Kosina, Benjamin Tissoires,
linux-input, linux-kernel
Signed-off-by: Filipe Laíns <lains@archlinux.org>
---
drivers/hid/hid-logitech-hidpp.c | 32 +++++++++++++++++++++++++++++++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
index e3b6245bf4b2..21268c9fa71a 100644
--- a/drivers/hid/hid-logitech-hidpp.c
+++ b/drivers/hid/hid-logitech-hidpp.c
@@ -3749,15 +3749,45 @@ static const struct hid_device_id hidpp_devices[] = {
{ L27MHZ_DEVICE(HID_ANY_ID) },
- { /* Logitech G403 Gaming Mouse over USB */
+ { /* Logitech G203/Prodigy Gaming Mouse */
+ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC084) },
+ { /* Logitech G302 Gaming Mouse */
+ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC07F) },
+ { /* Logitech G303 Gaming Mouse */
+ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC080) },
+ { /* Logitech G400 Gaming Mouse */
+ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC07E) },
+ { /* Logitech G403 Wireless Gaming Mouse over USB */
HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC082) },
+ { /* Logitech G403 Gaming Mouse */
+ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC083) },
+ { /* Logitech G403 Hero Gaming Mouse over USB */
+ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC08F) },
+ { /* Logitech G502 Proteus Core Gaming Mouse */
+ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC07D) },
+ { /* Logitech G502 Proteus Spectrum Gaming Mouse over USB */
+ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC332) },
+ { /* Logitech G502 Hero Gaming Mouse over USB */
+ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC08B) },
{ /* Logitech G700 Gaming Mouse over USB */
HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC06B) },
+ { /* Logitech G700s Gaming Mouse over USB */
+ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC07C) },
+ { /* Logitech G703 Gaming Mouse over USB */
+ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC087) },
+ { /* Logitech G703 Hero Gaming Mouse over USB */
+ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC090) },
{ /* Logitech G900 Gaming Mouse over USB */
HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC081) },
+ { /* Logitech G903 Gaming Mouse over USB */
+ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC086) },
+ { /* Logitech G903 Hero Gaming Mouse over USB */
+ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC091) },
{ /* Logitech G920 Wheel over USB */
HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G920_WHEEL),
.driver_data = HIDPP_QUIRK_CLASS_G920 | HIDPP_QUIRK_FORCE_OUTPUT_REPORTS},
+ { /* Logitech G Pro Gaming Mouse over USB */
+ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC088) },
{ /* MX5000 keyboard over Bluetooth */
HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, 0xb305),
--
2.22.0
^ permalink raw reply related
* [PATCH] hid-logitech-dj: rename "gaming" receiver to "lightspeed"
From: Filipe Laíns @ 2019-07-16 7:36 UTC (permalink / raw)
Cc: nlopezcasad, Filipe Laíns, Jiri Kosina, Benjamin Tissoires,
linux-input, linux-kernel
this should help people identify the receiver. there are several
receivers used in gaming mice. the "lightspeed" technology is pretty
well advertise so this won't just be an obscure name.
Signed-off-by: Filipe Laíns <lains@archlinux.org>
---
drivers/hid/hid-ids.h | 2 +-
drivers/hid/hid-logitech-dj.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 0d695f8e1b2c..ab9d382b067d 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -768,7 +768,7 @@
#define USB_DEVICE_ID_LOGITECH_NANO_RECEIVER 0xc52f
#define USB_DEVICE_ID_LOGITECH_UNIFYING_RECEIVER_2 0xc532
#define USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_2 0xc534
-#define USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_GAMING 0xc539
+#define USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_LIGHTSPEED 0xc539
#define USB_DEVICE_ID_SPACETRAVELLER 0xc623
#define USB_DEVICE_ID_SPACENAVIGATOR 0xc626
#define USB_DEVICE_ID_DINOVO_DESKTOP 0xc704
diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
index 6196217a7d93..4334acb49129 100644
--- a/drivers/hid/hid-logitech-dj.c
+++ b/drivers/hid/hid-logitech-dj.c
@@ -1832,9 +1832,9 @@ static const struct hid_device_id logi_dj_receivers[] = {
HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,
USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_2),
.driver_data = recvr_type_hidpp},
- { /* Logitech gaming receiver (0xc539) */
+ { /* Logitech lightspeed receiver (0xc539) */
HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,
- USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_GAMING),
+ USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_LIGHTSPEED),
.driver_data = recvr_type_gaming_hidpp},
{ /* Logitech 27 MHz HID++ 1.0 receiver (0xc513) */
HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_MX3000_RECEIVER),
--
2.22.0
^ permalink raw reply related
* Re: [PATCH 5/5] Input: ts4800-ts: Use devm_platform_ioremap_resource()
From: Dmitry Torokhov @ 2019-07-16 7:34 UTC (permalink / raw)
To: Mukesh Ojha
Cc: shawnguo, s.hauer, linux-imx, linux-input, linux-arm-kernel,
linux-kernel
In-Reply-To: <1554362243-2888-6-git-send-email-mojha@codeaurora.org>
On Thu, Apr 04, 2019 at 12:47:23PM +0530, Mukesh Ojha wrote:
> devm_platform_ioremap_resource() internally have platform_get_resource()
> and devm_ioremap_resource() in it. So instead of calling them separately
> use devm_platform_ioremap_resource() directly.
>
> Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
Applied, thank you.
> ---
> drivers/input/touchscreen/ts4800-ts.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/input/touchscreen/ts4800-ts.c b/drivers/input/touchscreen/ts4800-ts.c
> index fed73ee..5b4f536 100644
> --- a/drivers/input/touchscreen/ts4800-ts.c
> +++ b/drivers/input/touchscreen/ts4800-ts.c
> @@ -148,7 +148,6 @@ static int ts4800_ts_probe(struct platform_device *pdev)
> {
> struct input_polled_dev *poll_dev;
> struct ts4800_ts *ts;
> - struct resource *res;
> int error;
>
> ts = devm_kzalloc(&pdev->dev, sizeof(*ts), GFP_KERNEL);
> @@ -159,8 +158,7 @@ static int ts4800_ts_probe(struct platform_device *pdev)
> if (error)
> return error;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - ts->base = devm_ioremap_resource(&pdev->dev, res);
> + ts->base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(ts->base))
> return PTR_ERR(ts->base);
>
> --
> Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center,
> Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
>
--
Dmitry
^ permalink raw reply
* Re: [PATCH 4/5] Input: sun4i-ts: Use devm_platform_ioremap_resource()
From: Dmitry Torokhov @ 2019-07-16 7:34 UTC (permalink / raw)
To: Mukesh Ojha
Cc: shawnguo, s.hauer, linux-imx, linux-input, linux-arm-kernel,
linux-kernel
In-Reply-To: <1554362243-2888-5-git-send-email-mojha@codeaurora.org>
On Thu, Apr 04, 2019 at 12:47:22PM +0530, Mukesh Ojha wrote:
> devm_platform_ioremap_resource() internally have platform_get_resource()
> and devm_ioremap_resource() in it. So instead of calling them separately
> use devm_platform_ioremap_resource() directly.
>
> Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
Applied, thank you.
> ---
> drivers/input/touchscreen/sun4i-ts.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/input/touchscreen/sun4i-ts.c b/drivers/input/touchscreen/sun4i-ts.c
> index d2e14d9..bbb0104 100644
> --- a/drivers/input/touchscreen/sun4i-ts.c
> +++ b/drivers/input/touchscreen/sun4i-ts.c
> @@ -309,8 +309,7 @@ static int sun4i_ts_probe(struct platform_device *pdev)
> input_set_drvdata(ts->input, ts);
> }
>
> - ts->base = devm_ioremap_resource(dev,
> - platform_get_resource(pdev, IORESOURCE_MEM, 0));
> + ts->base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(ts->base))
> return PTR_ERR(ts->base);
>
> --
> Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center,
> Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
>
--
Dmitry
^ permalink raw reply
* Re: [PATCH 2/5] Input: mxs-lradc-ts.c: Use devm_platform_ioremap_resource()
From: Dmitry Torokhov @ 2019-07-16 7:32 UTC (permalink / raw)
To: Mukesh Ojha
Cc: shawnguo, s.hauer, linux-imx, linux-input, linux-arm-kernel,
linux-kernel
In-Reply-To: <1554362243-2888-3-git-send-email-mojha@codeaurora.org>
On Thu, Apr 04, 2019 at 12:47:20PM +0530, Mukesh Ojha wrote:
> devm_platform_ioremap_resource() internally have platform_get_resource()
> and devm_ioremap_resource() in it. So instead of calling them separately
> use devm_platform_ioremap_resource() directly.
>
> Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
> ---
> drivers/input/touchscreen/mxs-lradc-ts.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/input/touchscreen/mxs-lradc-ts.c b/drivers/input/touchscreen/mxs-lradc-ts.c
> index c850b51..af047fa 100644
> --- a/drivers/input/touchscreen/mxs-lradc-ts.c
> +++ b/drivers/input/touchscreen/mxs-lradc-ts.c
> @@ -615,7 +615,6 @@ static int mxs_lradc_ts_probe(struct platform_device *pdev)
> struct device_node *node = dev->parent->of_node;
> struct mxs_lradc *lradc = dev_get_drvdata(dev->parent);
> struct mxs_lradc_ts *ts;
> - struct resource *iores;
> int ret, irq, virq, i;
> u32 ts_wires = 0, adapt;
>
> @@ -629,10 +628,7 @@ static int mxs_lradc_ts_probe(struct platform_device *pdev)
> ts->dev = dev;
> spin_lock_init(&ts->lock);
>
> - iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - if (!iores)
> - return -EINVAL;
> - ts->base = devm_ioremap(dev, iores->start, resource_size(iores));
> + ts->base = devm_platform_ioremap_resource(pdev, 0);
> if (!ts->base)
> return -ENOMEM;
This driver did not implement error handling properly (should have used
IS_ERR()/PTR_ERR()), I adjusted and applied.
Thanks.
--
Dmitry
^ permalink raw reply
* Re: [PATCH 1/5] Input: fsl-imx25-tcq: Use devm_platform_ioremap_resource()
From: Dmitry Torokhov @ 2019-07-16 7:30 UTC (permalink / raw)
To: Mukesh Ojha
Cc: s.hauer, linux-kernel, linux-imx, linux-input, shawnguo,
linux-arm-kernel
In-Reply-To: <1554362243-2888-2-git-send-email-mojha@codeaurora.org>
On Thu, Apr 04, 2019 at 12:47:19PM +0530, Mukesh Ojha wrote:
> devm_platform_ioremap_resource() internally have platform_get_resource()
> and devm_ioremap_resource() in it. So instead of calling them separately
> use devm_platform_ioremap_resource() directly.
>
> Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
Applied, thank you.
> ---
> drivers/input/touchscreen/fsl-imx25-tcq.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/input/touchscreen/fsl-imx25-tcq.c b/drivers/input/touchscreen/fsl-imx25-tcq.c
> index 1d6c8f4..b66df8a 100644
> --- a/drivers/input/touchscreen/fsl-imx25-tcq.c
> +++ b/drivers/input/touchscreen/fsl-imx25-tcq.c
> @@ -503,7 +503,6 @@ static int mx25_tcq_probe(struct platform_device *pdev)
> struct input_dev *idev;
> struct mx25_tcq_priv *priv;
> struct mx25_tsadc *tsadc = dev_get_drvdata(dev->parent);
> - struct resource *res;
> void __iomem *mem;
> int error;
>
> @@ -512,8 +511,7 @@ static int mx25_tcq_probe(struct platform_device *pdev)
> return -ENOMEM;
> priv->dev = dev;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - mem = devm_ioremap_resource(dev, res);
> + mem = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(mem))
> return PTR_ERR(mem);
>
> --
> Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center,
> Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
>
--
Dmitry
^ permalink raw reply
* Re: [PATCH v2 2/2] input: soc_button_array for newer surface devices
From: Dmitry Torokhov @ 2019-07-16 7:21 UTC (permalink / raw)
To: Maximilian Luz
Cc: linux-kernel, linux-input, platform-driver-x86, Hans de Goede,
Chen Yu, Darren Hart, Andy Shevchenko, Benjamin Tissoires
In-Reply-To: <20190702003740.75970-3-luzmaximilian@gmail.com>
Hi Maximilian,
On Tue, Jul 02, 2019 at 02:37:40AM +0200, Maximilian Luz wrote:
> Power and volume button support for 5th and 6th genration Microsoft
> Surface devices via soc_button_array.
>
> Note that these devices use the same MSHW0040 device as on the Surface
> Pro 4, however the implementation is different (GPIOs vs. ACPI
> notifications). Thus some checking is required to ensure we only load
> this driver on the correct devices.
When you are saying that Pro 4 and later models use different
notifications, does this mean that Pro 4 does not define any GPIOs? If
so can we use their presence as indicator whether we should be using
this driver or not. I would like to avoid repeating the ACPI parsing
code that you have in the platform driver.
> +static int soc_device_check_MSHW0040(struct device *dev)
> +{
> + acpi_handle handle = ACPI_HANDLE(dev);
> + union acpi_object *result;
> + u64 oem_platform_rev = 0;
> + int gpios;
> +
> + // get OEM platform revision
> + result = acpi_evaluate_dsm_typed(handle, &MSHW0040_DSM_UUID,
> + MSHW0040_DSM_REVISION,
> + MSHW0040_DSM_GET_OMPR, NULL,
> + ACPI_TYPE_INTEGER);
> +
> + if (result) {
> + oem_platform_rev = result->integer.value;
> + ACPI_FREE(result);
> + }
> +
> + if (oem_platform_rev == 0)
> + return -ENODEV;
> +
> + dev_dbg(dev, "OEM Platform Revision %llu\n", oem_platform_rev);
> +
> + /*
> + * We are _really_ expecting GPIOs here. If we do not get any, this
> + * means the GPIO driver has not been loaded yet (which can happen).
> + * Try again later.
> + */
> + gpios = gpiod_count(dev, NULL);
> + if (gpios < 0)
> + return -EAGAIN;
I do not believe -EAGAIN has any special meaning in the driver core;
also when the GPIO controller is not ready gpiod_get() will return
-EPROBE_DEFER, which is the prober way if signalling that some resource
is not yet available and probe should be retries at a later time.
Moreover, I do not believe that gpiod_count() needs GPIO controller to
be ready, the count is taken from board firmware or static board file
definition, so if gpiod_count() returns 0 it should be clear indication
that the driver should not be used with the device.
Thanks.
--
Dmitry
^ permalink raw reply
* Re: [PATCH v2 2/3] input: touchscreen mc13xxx: Make platform data optional
From: Lukasz Majewski @ 2019-07-16 7:02 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Lee Jones, linux-kernel, Sascha Hauer, Enrico Weigelt,
Thomas Gleixner, Kate Stewart, linux-input
In-Reply-To: <20190715182757.GA136092@dtor-ws>
[-- Attachment #1: Type: text/plain, Size: 1265 bytes --]
Hi Dmitry,
> On Mon, Jul 15, 2019 at 10:43:44AM +0200, Lukasz Majewski wrote:
> > Hi Dmitry,
> >
> > Thank you for your reply.
> >
> > > On Fri, Jul 12, 2019 at 12:23:45AM +0200, Lukasz Majewski wrote:
> > > > From: Sascha Hauer <s.hauer@pengutronix.de>
> > > >
> > > > The platform data once was optional, make it optional again.
> > > > This is a first step towards device tree support for the mc13xxx
> > > > touchscreen driver.
> > >
> > > I would prefer seeing it together with patches introducing device
> > > tree support.
> >
> > Ok, I will merge this patch to patch 3/3.
>
> Uh, I must be missing something, but I do not see anything dedicated
> to device tree handling in 3/3...
Yes, you are right - the 3/3 adds only IDs for mc34708 device.
The device tree conversion/handling is not planned for now.
Patches, which I've sent in this series, allow the mc34708 device to be
usable with contemporary kernel (e.g. 5.2).
>
> Thanks.
>
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox