Re: [PATCH] Remap micmute to F20
Em Tue, 2012-08-28 às 19:32 -0400, James M Leddy escreveu: > Because of a limitation of the X11 protocol, we can't use micmute in > it's current mapping. I've chosen to map this to F20, since we do > similar things with the touchpad buttons for the same reason. Whatever > we use, we will have to agree with xkeyboard-config. > > http://lists.freedesktop.org/archives/xorg-devel/2012-August/033442.html Feel free to implement this once you're done :) https://bugzilla.gnome.org/show_bug.cgi?id=651051 Cheers -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] Remap micmute to F20
Because of a limitation of the X11 protocol, we can't use micmute in it's current mapping. I've chosen to map this to F20, since we do similar things with the touchpad buttons for the same reason. Whatever we use, we will have to agree with xkeyboard-config. http://lists.freedesktop.org/archives/xorg-devel/2012-August/033442.html Signed-off-by: James M. Leddy --- keymaps/module-lenovo |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keymaps/module-lenovo b/keymaps/module-lenovo index 8e38883..f94678d 100644 --- a/keymaps/module-lenovo +++ b/keymaps/module-lenovo @@ -14,4 +14,4 @@ 0x15 volumedown 0x16 mute 0x17 prog1 # ThinkPad/ThinkVantage button (high keycode: "vendor") -0x1A micmute # Microphone mute +0x1A f20 # Microphone mute -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2] HID: multitouch: Remove the redundant touch state
On Wed, 22 Aug 2012, Henrik Rydberg wrote: > With the input_mt_sync_frame() function in place, there is no longer > any need to keep the full touch state in the driver. This patch > removes the slot state and replaces the lookup code with the input-mt > equivalent. The initialization code is moved to mt_input_configured(), > to make sure the full HID report has been seen. > > Signed-off-by: Henrik Rydberg > --- > Hi Benjamin, > > Maybe this patch works better? It has received limited testing so far. What is the status of this patch please? Henrik, Benjamin? > > Henrik > > drivers/hid/hid-multitouch.c | 133 > +++ > 1 file changed, 46 insertions(+), 87 deletions(-) > > diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c > index c400d90..dc08a4e 100644 > --- a/drivers/hid/hid-multitouch.c > +++ b/drivers/hid/hid-multitouch.c > @@ -56,7 +56,6 @@ struct mt_slot { > __s32 x, y, p, w, h; > __s32 contactid;/* the device ContactID assigned to this slot */ > bool touch_state; /* is the touch valid? */ > - bool seen_in_this_frame;/* has this slot been updated */ > }; > > struct mt_class { > @@ -93,7 +92,7 @@ struct mt_device { > * 1 means we should use a serial protocol > * > 1 means hybrid (multitouch) protocol */ > bool curvalid; /* is the current contact valid? */ > - struct mt_slot *slots; > + unsigned mt_flags; /* flags to pass to input-mt */ > }; > > /* classes of device behavior */ > @@ -134,25 +133,6 @@ static int cypress_compute_slot(struct mt_device *td) > return -1; > } > > -static int find_slot_from_contactid(struct mt_device *td) > -{ > - int i; > - for (i = 0; i < td->maxcontacts; ++i) { > - if (td->slots[i].contactid == td->curdata.contactid && > - td->slots[i].touch_state) > - return i; > - } > - for (i = 0; i < td->maxcontacts; ++i) { > - if (!td->slots[i].seen_in_this_frame && > - !td->slots[i].touch_state) > - return i; > - } > - /* should not occurs. If this happens that means > - * that the device sent more touches that it says > - * in the report descriptor. It is ignored then. */ > - return -1; > -} > - > static struct mt_class mt_classes[] = { > { .name = MT_CLS_DEFAULT, > .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP }, > @@ -319,24 +299,16 @@ static int mt_input_mapping(struct hid_device *hdev, > struct hid_input *hi, > * We need to ignore fields that belong to other collections > * such as Mouse that might have the same GenericDesktop usages. */ > if (field->application == HID_DG_TOUCHSCREEN) > - set_bit(INPUT_PROP_DIRECT, hi->input->propbit); > + td->mt_flags |= INPUT_MT_DIRECT; > else if (field->application != HID_DG_TOUCHPAD) > return 0; > > - /* In case of an indirect device (touchpad), we need to add > - * specific BTN_TOOL_* to be handled by the synaptics xorg > - * driver. > - * We also consider that touchscreens providing buttons are touchpads. > + /* > + * Model touchscreens providing buttons as touchpads. >*/ > if (field->application == HID_DG_TOUCHPAD || > - (usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON || > - cls->is_indirect) { > - set_bit(INPUT_PROP_POINTER, hi->input->propbit); > - set_bit(BTN_TOOL_FINGER, hi->input->keybit); > - set_bit(BTN_TOOL_DOUBLETAP, hi->input->keybit); > - set_bit(BTN_TOOL_TRIPLETAP, hi->input->keybit); > - set_bit(BTN_TOOL_QUADTAP, hi->input->keybit); > - } > + (usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON) > + td->mt_flags |= INPUT_MT_POINTER; > > /* eGalax devices provide a Digitizer.Stylus input which overrides >* the correct Digitizers.Finger X/Y ranges. > @@ -353,8 +325,6 @@ static int mt_input_mapping(struct hid_device *hdev, > struct hid_input *hi, > EV_ABS, ABS_MT_POSITION_X); > set_abs(hi->input, ABS_MT_POSITION_X, field, > cls->sn_move); > - /* touchscreen emulation */ > - set_abs(hi->input, ABS_X, field, cls->sn_move); > mt_store_field(usage, td, hi); > td->last_field_index = field->index; > return 1; > @@ -363,8 +333,6 @@ static int mt_input_mapping(struct hid_device *hdev, > struct hid_input *hi, > EV_ABS, ABS_MT_POSITION_Y); > set_abs(hi->input, ABS_MT_POSITION_Y, field, > cls->sn_move); > - /* touchscreen emulation */ > - se
Re: [PATCH] Add Wacom product id
On Tue, Aug 28, 2012 at 10:51 AM, srinivas pandruvada wrote: > Added 0x00EF as product id for the Wacom drivers. > > Change-Id: Iacdefbd317395309ecb7972f56413829a9c62e1f > Signed-off-by: srinivas pandruvada Hi Srinivas, 0xEF was added in June 12, 2012 along with 0xED. It is under Linus' kernel tree. Ping > --- > drivers/input/tablet/wacom_wac.c |4 > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/drivers/input/tablet/wacom_wac.c > b/drivers/input/tablet/wacom_wac.c > index 58426d0..479dfa7 100644 > --- a/drivers/input/tablet/wacom_wac.c > +++ b/drivers/input/tablet/wacom_wac.c > @@ -1800,6 +1800,9 @@ static const struct wacom_features wacom_features_0xE6 = > static const struct wacom_features wacom_features_0xEC = > { "Wacom ISDv4 EC", WACOM_PKGLEN_GRAPHIRE, 25710, 14500, 255, > 0, TABLETPC,WACOM_INTUOS_RES, WACOM_INTUOS_RES }; > +static const struct wacom_features wacom_features_0xEF = > + { "Wacom ISDv4 EF", WACOM_PKGLEN_GRAPHIRE, 25710, 14500, 255, > + 0, TABLETPC,WACOM_INTUOS_RES, WACOM_INTUOS_RES }; > static const struct wacom_features wacom_features_0x47 = > { "Wacom Intuos2 6x8",WACOM_PKGLEN_INTUOS,20320, 16240, 1023, > 31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; > @@ -1973,6 +1976,7 @@ const struct usb_device_id wacom_ids[] = { > { USB_DEVICE_WACOM(0xE3) }, > { USB_DEVICE_WACOM(0xE6) }, > { USB_DEVICE_WACOM(0xEC) }, > + { USB_DEVICE_WACOM(0xEF) }, > { USB_DEVICE_WACOM(0x47) }, > { USB_DEVICE_WACOM(0xF4) }, > { USB_DEVICE_LENOVO(0x6004) }, > -- > 1.7.7.6 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-input" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] Add Wacom product id
Added 0x00EF as product id for the Wacom drivers. Change-Id: Iacdefbd317395309ecb7972f56413829a9c62e1f Signed-off-by: srinivas pandruvada --- drivers/input/tablet/wacom_wac.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index 58426d0..479dfa7 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c @@ -1800,6 +1800,9 @@ static const struct wacom_features wacom_features_0xE6 = static const struct wacom_features wacom_features_0xEC = { "Wacom ISDv4 EC", WACOM_PKGLEN_GRAPHIRE, 25710, 14500, 255, 0, TABLETPC,WACOM_INTUOS_RES, WACOM_INTUOS_RES }; +static const struct wacom_features wacom_features_0xEF = + { "Wacom ISDv4 EF", WACOM_PKGLEN_GRAPHIRE, 25710, 14500, 255, + 0, TABLETPC,WACOM_INTUOS_RES, WACOM_INTUOS_RES }; static const struct wacom_features wacom_features_0x47 = { "Wacom Intuos2 6x8",WACOM_PKGLEN_INTUOS,20320, 16240, 1023, 31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; @@ -1973,6 +1976,7 @@ const struct usb_device_id wacom_ids[] = { { USB_DEVICE_WACOM(0xE3) }, { USB_DEVICE_WACOM(0xE6) }, { USB_DEVICE_WACOM(0xEC) }, + { USB_DEVICE_WACOM(0xEF) }, { USB_DEVICE_WACOM(0x47) }, { USB_DEVICE_WACOM(0xF4) }, { USB_DEVICE_LENOVO(0x6004) }, -- 1.7.7.6 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH 2/5] MFD: ti_tscadc: Add support for TI's TSC/ADC MFDevice
Hi, On Fri, Aug 24, 2012 at 00:18:31, Matthias Kaehlcke wrote: > Hi, > > El Thu, Aug 23, 2012 at 04:19:57PM +0530 Patil, Rachna ha dit: > > > Add the mfd core driver which supports touchscreen and ADC. > > With this patch we are only adding infrastructure to support the MFD > > clients. > > > > Signed-off-by: Patil, Rachna > > --- > > diff --git a/drivers/mfd/ti_tscadc.c b/drivers/mfd/ti_tscadc.c ... > > +static int __devinit ti_tscadc_probe(struct platform_device *pdev) > > +{ > > + struct ti_tscadc_dev*tscadc; > > + int err, ctrl; > > + int clk_value, clock_rate; > > + struct resource *res; > > + struct clk *clk; > > + > > + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > > + if (!res) { > > + dev_err(&pdev->dev, "no memory resource defined.\n"); > > + return -EINVAL; > > + } > > + > > + /* Allocate memory for device */ > > + tscadc = kzalloc(sizeof(struct ti_tscadc_dev), GFP_KERNEL); > > + if (!tscadc) { > > + dev_err(&pdev->dev, "failed to allocate memory.\n"); > > + return -ENOMEM; > > + } > > + > > + res = request_mem_region(res->start, resource_size(res), pdev->name); > > + if (!res) { > > + dev_err(&pdev->dev, "failed to reserve registers.\n"); > > + err = -EBUSY; > > + goto err_free_mem; > > + } > > + > > + tscadc->tscadc_base = ioremap(res->start, resource_size(res)); > > + if (!tscadc->tscadc_base) { > > + dev_err(&pdev->dev, "failed to map registers.\n"); > > + err = -ENOMEM; > > + goto err_release_mem; > > + } > > + > > + tscadc->irq = platform_get_irq(pdev, 0); > > + if (tscadc->irq < 0) { > > + dev_err(&pdev->dev, "no irq ID is specified.\n"); > > + return -ENODEV; > > goto err_iounmap_mem; Yes. Will add this. > > > ... > > +err_fail: > > + pm_runtime_put_sync(&pdev->dev); > > + pm_runtime_disable(&pdev->dev); > > + iounmap(tscadc->tscadc_base); > > +err_release_mem: > > + release_mem_region(res->start, resource_size(res)); > > + mfd_remove_devices(tscadc->dev); > > +err_free_mem: > > + platform_set_drvdata(pdev, NULL); > > shouldn't be necessary as the platform device doesn't exist any longer Ok. Will remove this. > > > ... > > +static int __devexit ti_tscadc_remove(struct platform_device *pdev) { > > + struct ti_tscadc_dev*tscadc = platform_get_drvdata(pdev); > > + struct resource *res; > > + > > + tscadc_writel(tscadc, REG_SE, 0x00); > > + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > > + iounmap(tscadc->tscadc_base); > > + release_mem_region(res->start, resource_size(res)); > > + > > + pm_runtime_put_sync(&pdev->dev); > > + pm_runtime_disable(&pdev->dev); > > + > > + mfd_remove_devices(tscadc->dev); > > + kfree(tscadc); > > + > > + platform_set_drvdata(pdev, NULL); > > same as above Will correct this as well. > > best regards > > -- > Matthias Kaehlcke > Embedded Linux Developer > Amsterdam > > The only way to do great work is to love what you do > (Steve Jobs) > .''`. > using free software / Debian GNU/Linux | http://debian.org : :' : > `. `'` > gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `- > Thanks & Regards, Rachna -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH 4/5] IIO : ADC: tiadc: Add support of TI's ADC driver
Hi, On Fri, Aug 24, 2012 at 00:32:39, Matthias Kaehlcke wrote: > Hi, > > El Thu, Aug 23, 2012 at 04:20:21PM +0530 Patil, Rachna ha dit: > > > This patch adds support for TI's ADC driver. > > This is a multifunctional device. > > Analog input lines are provided on which voltage measurements can be > > carried out. > > You can have upto 8 input lines. > > > > Signed-off-by: Patil, Rachna > > --- > > > > diff --git a/drivers/iio/adc/ti_adc.c b/drivers/iio/adc/ti_adc.c ... > > +static int __devinit tiadc_probe(struct platform_device *pdev) { > > + struct iio_dev *idev; > > + int err; > > + struct adc_device *adc_dev = NULL; > > + struct ti_tscadc_dev*tscadc_dev = pdev->dev.platform_data; > > + struct mfd_tscadc_board *board_data; > > + > > + board_data = (struct mfd_tscadc_board *)tscadc_dev->dev->platform_data; > > + if (!board_data) { > > + dev_err(tscadc_dev->dev, "Could not find platform data\n"); > > + return -EINVAL; > > + } > > + > > + idev = iio_device_alloc(sizeof(struct adc_device)); > > + if (idev == NULL) { > > + dev_err(&pdev->dev, "failed to allocate iio device.\n"); > > + err = -ENOMEM; > > + goto err_ret; > > + } > > + adc_dev = iio_priv(idev); > > + > > + tscadc_dev->adc = adc_dev; > > + adc_dev->mfd_tscadc = tscadc_dev; > > + adc_dev->idev = idev; > > + adc_dev->adc_channels = board_data->adc_init->adc_channels; > > + > > + idev->dev.parent = &pdev->dev; > > + idev->name = dev_name(&pdev->dev); > > + idev->modes = INDIO_DIRECT_MODE; > > + idev->info = &tiadc_info; > > + > > + adc_step_config(adc_dev); > > + > > + err = tiadc_channel_init(idev, adc_dev); > > + if (err < 0) > > + goto err_fail; > > + > > + err = iio_device_register(idev); > > + if (err) > > + goto err_free_channels; > > + > > + dev_info(&pdev->dev, "attached adc driver\n"); > > + platform_set_drvdata(pdev, idev); > > + > > + return 0; > > + > > +err_free_channels: > > + tiadc_channel_remove(idev); > > +err_fail: > > + iio_device_unregister(idev); > > + iio_device_free(idev); > > +err_ret: > > + platform_set_drvdata(pdev, NULL); > > not necessary, the platform device doesn't exist anymore Ok. I will correct this. > > > + iio_device_free(idev); > > already done some lines above and could be executed without having allocated > the iio device (when iio_device_alloc() fails) > > > +static int __devexit tiadc_remove(struct platform_device *pdev) { > > + struct ti_tscadc_dev *tscadc_dev = pdev->dev.platform_data; > > + struct adc_device *adc_dev = tscadc_dev->adc; > > + struct iio_dev *idev = adc_dev->idev; > > + > > + iio_device_unregister(idev); > > + tiadc_channel_remove(idev); > > + > > + tscadc_dev->adc = NULL; > > + > > + iio_device_free(idev); > > + platform_set_drvdata(pdev, NULL); > > see above Yes, will correct this as well. > > best regards > > -- > Matthias Kaehlcke > Embedded Linux Developer > Amsterdam > >If sharing a thing in no way diminishes it, >it is not rightly owned if it is not shared > .''`. > using free software / Debian GNU/Linux | http://debian.org : :' : > `. `'` > gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `- > Regards, Rachna -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] pwm-imx: Fix config / enable / disable
On Thu, Aug 23, 2012 at 11:03:57PM +0200, Benoît Thébaudeau wrote: > imx_pwm_config() did not enable the PWM IP clock while accessing the > registers. > Hence, a call to pwm_config() had no effect before pwm_enable() had been > called, > which does not comply to the PWM API. > > Moreover, calling pwm_disable() then pwm_enable() must be a transparent > operation. > > This fixes the first setting of brightness through sysfs that had no effect > with > leds-pwm. I don't really like this patch. I'd like to have this one first, it makes further cleanups easier: https://lkml.org/lkml/2012/8/28/24 Simililarly, we should probably introduce a imx_pwm_[en|dis]able_v[12] Then, the pwm core already makes sure that pwm_enable/disable are called only once, so the if (imx->clk_enabled) in pwm_enable/disable is unnecessary. Sascha > > Cc: Thierry Reding > Cc: > Cc: Sascha Hauer > Cc: > Cc: Benoît Thébaudeau > Signed-off-by: Benoît Thébaudeau > --- > .../drivers/pwm/pwm-imx.c | 55 > +++- > 1 file changed, 43 insertions(+), 12 deletions(-) > > diff --git linux-next-c94456b.orig/drivers/pwm/pwm-imx.c > linux-next-c94456b/drivers/pwm/pwm-imx.c > index 2a0b353..0519bf2 100644 > --- linux-next-c94456b.orig/drivers/pwm/pwm-imx.c > +++ linux-next-c94456b/drivers/pwm/pwm-imx.c > @@ -55,6 +55,16 @@ static int imx_pwm_config(struct pwm_chip *chip, > { > struct imx_chip *imx = to_imx_chip(chip); > > + /* > + * If the PWM is disabled, make sure to turn on the clock before > + * accessing the registers. > + */ > + if (!imx->clk_enabled) { > + int rc = clk_prepare_enable(imx->clk); > + if (rc) > + return rc; > + } > + > if (!(cpu_is_mx1() || cpu_is_mx21())) { > unsigned long long c; > unsigned long period_cycles, duty_cycles, prescale; > @@ -85,8 +95,11 @@ static int imx_pwm_config(struct pwm_chip *chip, > writel(period_cycles, imx->mmio_base + MX3_PWMPR); > > cr = MX3_PWMCR_PRESCALER(prescale) | > - MX3_PWMCR_DOZEEN | MX3_PWMCR_WAITEN | > - MX3_PWMCR_DBGEN | MX3_PWMCR_EN; > + MX3_PWMCR_DOZEEN | MX3_PWMCR_WAITEN | MX3_PWMCR_DBGEN; > + > + /* If the PWM is enabled, keep it so. */ > + if (imx->clk_enabled) > + cr |= MX3_PWMCR_EN; > > if (cpu_is_mx25()) > cr |= MX3_PWMCR_CLKSRC_IPG; > @@ -118,32 +131,50 @@ static int imx_pwm_config(struct pwm_chip *chip, > BUG(); > } > > + /* If the PWM is disabled, turn the clock off again to save power. */ > + if (!imx->clk_enabled) > + clk_disable_unprepare(imx->clk); > + > return 0; > } > > static int imx_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) > { > struct imx_chip *imx = to_imx_chip(chip); > - int rc = 0; > + int rc; > > - if (!imx->clk_enabled) { > - rc = clk_prepare_enable(imx->clk); > - if (!rc) > - imx->clk_enabled = 1; > + if (imx->clk_enabled) > + return 0; > + > + rc = clk_prepare_enable(imx->clk); > + if (rc) > + return rc; > + > + if (!(cpu_is_mx1() || cpu_is_mx21())) { > + u32 cr = readl(imx->mmio_base + MX3_PWMCR); > + cr |= MX3_PWMCR_EN; > + writel(cr, imx->mmio_base + MX3_PWMCR); > } > - return rc; > + > + imx->clk_enabled = 1; > + return 0; > } > > static void imx_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) > { > struct imx_chip *imx = to_imx_chip(chip); > > - writel(0, imx->mmio_base + MX3_PWMCR); > + if (!imx->clk_enabled) > + return; > > - if (imx->clk_enabled) { > - clk_disable_unprepare(imx->clk); > - imx->clk_enabled = 0; > + if (!(cpu_is_mx1() || cpu_is_mx21())) { > + u32 cr = readl(imx->mmio_base + MX3_PWMCR); > + cr &= ~MX3_PWMCR_EN; > + writel(cr, imx->mmio_base + MX3_PWMCR); > } > + > + clk_disable_unprepare(imx->clk); > + imx->clk_enabled = 0; > } > > static struct pwm_ops imx_pwm_ops = { > -- > To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-