Re: [PATCH 1/2] platform/x86: Add Asus Wireless Radio Control driver

2016-01-05 Thread Andy Shevchenko
> +MODULE_DEVICE_TABLE(acpi, device_ids); > + > +static struct acpi_driver asus_wireless_driver = { > + .name = "Asus Wireless Radio Control Driver", > + .class = "hotkey", > + .ids = device_ids, > + .ops = { > +

Re: [PATCH 0/2] Asus Wireless Radio Control driver

2016-01-05 Thread Andy Shevchenko
the airplane mode indicator LED. This device appears in > the DSDT as "ASHS". > > I decided to split the series and move the commits that drive the LED to a > separate series, so this part can be merged without waiting for feedback on > the > new airplane mode RFKill

Re: [PATCH] surface pro 4: Add support for Surface Pro 4 Buttons

2015-12-27 Thread Andy Shevchenko
name = acpi_device_name(device); > + strcpy(name, SURFACE_BUTTON_DEVICE_NAME); > + snprintf(button->phys, sizeof(button->phys), "%s/buttons", hid); > + > + input->name = name; > + input->phys = button->phys; > + input-

Re: [PATCH v3] surface pro 4: Add support for Surface Pro 4 Buttons

2015-12-27 Thread Andy Shevchenko
struct acpi_device_id surface_button_device_ids[] = { > - {SURFACE_BUTTON_HID,0}, > + {SURFACE_PRO3_BUTTON_HID,0}, > + {SURFACE_PRO4_BUTTON_HID,0}, > {"", 0}, > }; > MODULE_DEVICE_TABLE(acpi, surface_button_device_ids); > @@ -202,8 +204,8

Re: [PATCH 4/4] asus-wireless: Toggle airplane mode LED

2015-12-27 Thread Andy Shevchenko
s = LED_CORE_SUSPENDRESUME; > + data->led.max_brightness = 1; > + data->led.default_trigger = "rfkill-airplane-mode"; > + err = led_classdev_register(>dev, >led); > + if (err) > + goto fail; > return 0; > >

Re: [PATCH 1/4] platform/x86: Add Asus Wireless Radio Control driver

2015-12-27 Thread Andy Shevchenko
after switching to devm_ > + kfree(data); Ditto. > + return 0; > +} > + > +static const struct acpi_device_id device_ids[] = { > + {"ATK4002", 0}, > + {"", 0}, > +}; > +MODULE_DEVICE_TABLE(acpi, device_ids); > + > +static struct acpi_dri

Re: "special" key when Lenovo Yoga 900 in tablet mode

2015-12-20 Thread Andy Shevchenko
actually be properly handled and how that would be done? I > guess it could also just emit a key like the other ideapad values? I might be able to reproduce this next week. Maybe we will come up with the solution. -- With Best Regards, Andy Shevchenko -- To unsubscribe from this list: sen

Re: [PATCH V10 1/2] intel_pmc_ipc: update acpi resource structure for Punit

2015-12-17 Thread Andy Shevchenko
On Fri, 2015-12-11 at 10:09 -0800, Darren Hart wrote: > On Fri, Dec 11, 2015 at 12:49:11PM +0200, Andy Shevchenko wrote: > > On Fri, 2015-12-11 at 22:44 +0800, Qipeng Zha wrote: > > > BIOS restructure exported memory resources for Punit > > > in acpi table, So

Re: [PATCH V10 1/2] intel_pmc_ipc: update acpi resource structure for Punit

2015-12-11 Thread Andy Shevchenko
On Fri, 2015-12-11 at 22:44 +0800, Qipeng Zha wrote: > BIOS restructure exported memory resources for Punit > in acpi table, So update resources for Punit. > > Signed-off-by: Qipeng Zha <qipeng@intel.com> Right, my tag for both patches: Reviewed-by: Andy Shevchen

Re: [PATCH V9 2/2] platform:x86: add Intel P-Unit mailbox IPC driver

2015-12-10 Thread Andy Shevchenko
ed-off-by: Qipeng Zha <qipeng@intel.com> Couple of nitpicks below, otherwise finally my tag Reviewed-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> > > --- > change in v9 >  remove non-necessary cast for void pointer; >  remove redundant error messages.

Re: [PATCH V9 1/2] intel_pmc_ipc: update acpi resource structure for Punit

2015-12-10 Thread Andy Shevchenko
D_DATA_INDEX); > + if (!res) { > + dev_err(>dev, "Failed to get res of punit GTD > data\n"); > + return -ENXIO; > + } > + /* This is index 4 to cover GTD data register */ > + *++punit_res = *res; > + dev_info(>dev, &

Re: [PATCH V8 1/2] intel_pmc_ipc: update acpi resource structure for Punit

2015-12-09 Thread Andy Shevchenko
On Tue, 2015-12-08 at 16:21 -0800, Darren Hart wrote: > On Tue, Dec 08, 2015 at 02:57:18PM +0200, Andy Shevchenko wrote: > > On Mon, 2015-12-07 at 15:45 -0800, Darren Hart wrote: > > > On Tue, Dec 08, 2015 at 12:55:04AM +0800, Qipeng Zha wrote: > > > > BIOS restruc

Re: [PATCH V8 1/2] intel_pmc_ipc: update acpi resource structure for Punit

2015-12-08 Thread Andy Shevchenko
)res->start, (int)resource_size(res)); > > + > > + res = platform_get_resource(pdev, IORESOURCE_MEM, > > PLAT_RES_IPC_INDEX); > >   if (!res) { > >   dev_err(>dev, "Failed to get ipc > > resource\n"); > >   return -ENXIO; > &

Re: [PATCH V8 1/2] intel_pmc_ipc: update acpi resource structure for Punit

2015-12-08 Thread Andy Shevchenko
has something to print at that point. 2. No need to explicitly cast to / from void *. IPC_DEV *ipcdev = (IPC_DEV *)dev_id; Otherwise looks much better than very first version! Thanks for an update. -- Andy Shevchenko <andriy.shevche...@linux.intel.com> Intel Finland Oy -- To unsubscribe

Re: [PATCH 5/5] intel_scu_ipc: move ipclock to struct intel_scu_ipc_dev

2015-10-12 Thread Andy Shevchenko
On Sat, 2015-10-10 at 21:43 -0700, Darren Hart wrote: > On Fri, Oct 09, 2015 at 06:21:37PM +0300, Andy Shevchenko wrote: > > On Fri, 2015-10-09 at 17:11 +0300, Andy Shevchenko wrote: > > > No need to use global variable for a mutex. Move it to be a > > > member of

[PATCH v2 1/5] intel_scu_ipc: fix error path by turning to devm_* / pcim_*

2015-10-12 Thread Andy Shevchenko
The error handling is broken right now since it leaves resources unfreed. Convert the code to use managed resources to fix the error handling. Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- drivers/platform/x86/intel_scu_ipc.c | 26 --

[PATCH v2 4/5] intel_scu_ipc: switch to use module_pci_driver() macro

2015-10-12 Thread Andy Shevchenko
Eliminate some boilerplate code by using module_pci_driver() instead of init/exit, moving the salient bits from init into probe. Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- drivers/platform/x86/intel_scu_ipc.c | 23 ++- 1 file changed, 6 inse

[PATCH v2 3/5] intel_scu_ipc: convert to use struct device *

2015-10-12 Thread Andy Shevchenko
Switch the code to use struct device * instead of struct pci_dev * since there is no reason to access PCI related features in the driver. Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- drivers/platform/x86/intel_scu_ipc.c | 41

[PATCH v2 5/5] intel_scu_ipc: protect dev member assignment on ->remove()

2015-10-12 Thread Andy Shevchenko
Protect the dev member assignment in ->remove() since user may potentially call unbind from a sysfs even if the driver is built-in. The latter might be racy with ongoing SCU communication. Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- drivers/platform/x86/intel_

[PATCH v2 2/5] intel_scu_ipc: propagate pointer to struct intel_scu_ipc_dev

2015-10-12 Thread Andy Shevchenko
As much as poosible propagate a pointer to struct intel_scu_ipc_dev. There is no functional change. Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- drivers/platform/x86/intel_scu_ipc.c | 134 +++ 1 file changed, 74 insertions(

Re: [PATCH 1/5] intel_scu_ipc: fix error path by turning to devm_* / pcim_*

2015-10-12 Thread Andy Shevchenko
On Sat, 2015-10-10 at 21:21 -0700, Darren Hart wrote: > On Fri, Oct 09, 2015 at 05:11:32PM +0300, Andy Shevchenko wrote: > > The error handling is broken right now since it leaves resources > > unfreed. > > Convert the code to use managed resources to fix the error > >

[PATCH 1/5] intel_scu_ipc: fix error path by turning to devm_* / pcim_*

2015-10-09 Thread Andy Shevchenko
The error handling is broken right now since it leaves resources unfreed. Convert the code to use managed resources to fix the error handling. Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- drivers/platform/x86/intel_scu_ipc.c | 26 --

[PATCH 2/5] intel_scu_ipc: propagate struct intel_scu_ipc_dev

2015-10-09 Thread Andy Shevchenko
As much as poosible propagate struct intel_scu_ipc_dev. There is no functional change. Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- drivers/platform/x86/intel_scu_ipc.c | 134 +++ 1 file changed, 74 insertions(+), 60 deletions(-)

[PATCH 3/5] intel_scu_ipc: convert to use struct device *

2015-10-09 Thread Andy Shevchenko
Switch the code to use struct device * instead of struct pci_dev * since there is no reason to accee PCI related features in the driver. Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- drivers/platform/x86/intel_scu_ipc.c | 41

[PATCH 4/5] intel_scu_ipc: switch to use module_pci_driver() macro

2015-10-09 Thread Andy Shevchenko
The use of macro cleans up the code a bit. Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- drivers/platform/x86/intel_scu_ipc.c | 25 +++-- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/drivers/platform/x86/intel_scu_ipc.c b/d

[PATCH v1 3/3] intel_scu_ipc: take resources from PCI configuration

2015-01-21 Thread Andy Shevchenko
The patch makes driver to take the resources from PCI BAR0 instead of using hardcoded values. Signed-off-by: Andy Shevchenko andriy.shevche...@linux.intel.com --- drivers/platform/x86/intel_scu_ipc.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git

[PATCH v1 1/3] intel_scu_ipc: fix indentation in few places

2015-01-21 Thread Andy Shevchenko
While here, do couple of amendments: - move platform variable to the function where it's used - define intel_scu_ipc_check_status() static Signed-off-by: Andy Shevchenko andriy.shevche...@linux.intel.com --- drivers/platform/x86/intel_scu_ipc.c | 31 ++- 1 file

[PATCH v1 2/3] intel_scu_ipc: move error check out of the loop

2015-01-21 Thread Andy Shevchenko
This is small performance optimization of the busy_loop(). While here, use BIT() macro instead of plain integers when check the status. Signed-off-by: Andy Shevchenko andriy.shevche...@linux.intel.com --- drivers/platform/x86/intel_scu_ipc.c | 25 - 1 file changed, 12

Re: [PATCH 0/2] x86: Add IMR support to Quark/Galileo

2014-12-31 Thread Andy Shevchenko
100644 arch/x86/include/asm/imr.h create mode 100644 arch/x86/include/asm/intel-quark.h create mode 100644 arch/x86/kernel/imr.c create mode 100644 drivers/platform/x86/intel_galileo.c [1] http://www.spinics.net/lists/kernel/msg1886819.html -- With Best Regards, Andy Shevchenko

Re: [PATCH 1/2] x86: Add Isolated Memory Regions for Quark X1000

2014-12-31 Thread Andy Shevchenko
...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ Happy New Year! -- With Best Regards, Andy Shevchenko -- To unsubscribe from this list: send the line unsubscribe platform-driver-x86 in the body of a message to majord

Re: [PATCH 2/2] platform/x86: Add Intel Galileo platform specific setup

2014-12-31 Thread Andy Shevchenko
the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ -- With Best Regards, Andy Shevchenko -- To unsubscribe from this list: send the line

Re: [PATCH 1/3] platform/x86: panasonic-laptop: reuse module_acpi_driver

2013-09-03 Thread Andy Shevchenko
On Tue, 2013-09-03 at 12:07 +, Matthew Garrett wrote: On Wed, 2013-08-28 at 14:48 +0300, Andy Shevchenko wrote: +module_acpi_driver(acpi_pcc_driver); module_acpi_driver(acpi_pcc_driver), right? I've fixed that and applied. Oops, you are right. Please fix in all 3 cases. -- Andy

[PATCH 2/3] platform/x86: intel-smartconnect: reuse module_acpi_driver

2013-08-28 Thread Andy Shevchenko
There is a macro to register and unregister modules in simple cases, Let's use it and clean up the driver. Signed-off-by: Andy Shevchenko andriy.shevche...@linux.intel.com --- drivers/platform/x86/intel-smartconnect.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff

Re: [PATCH 5/8] minnowboard-gpio: Export MinnowBoard expansion GPIO

2013-06-27 Thread Andy Shevchenko
On Wed, 2013-06-26 at 09:21 -0700, Darren Hart wrote: On Wed, 2013-06-26 at 10:55 +0300, Andy Shevchenko wrote: + out: + return err; Are you planning to add something else to 'out' path? Otherwise I think it will look better if you do return instead of [useless] gotos. I

Re: [PATCH 5/8] minnowboard-gpio: Export MinnowBoard expansion GPIO

2013-06-26 Thread Andy Shevchenko
to add something else to 'out' path? Otherwise I think it will look better if you do return instead of [useless] gotos. -- Andy Shevchenko andriy.shevche...@linux.intel.com Intel Finland Oy -- To unsubscribe from this list: send the line unsubscribe platform-driver-x86 in the body of a message

Re: [PATCH 6/8] minnowboard-keys: Bind MinnowBoard buttons to arrow keys

2013-06-26 Thread Andy Shevchenko
, it should go to the platform code / board file under arch/x86/platform/minnow/... -- Andy Shevchenko andriy.shevche...@linux.intel.com Intel Finland Oy -- To unsubscribe from this list: send the line unsubscribe platform-driver-x86 in the body of a message to majord...@vger.kernel.org More majordomo