Re: [PATCH v5] HID: hid-multitouch: support fine-grain orientation reporting

2017-10-12 Thread Wei-Ning Huang
Sorry I forgot to remove the S-o-b of my Google email. Henrik can you help me remove that line if you pick it? Thanks. Wei-Ning On Thu, Oct 12, 2017 at 2:21 PM, Wei-Ning Huang <wnhu...@chromium.org> wrote: > From: Wei-Ning Huang <wnhu...@chromium.org> > > The current hid-m

Re: [PATCH v5] HID: hid-multitouch: support fine-grain orientation reporting

2017-10-12 Thread Wei-Ning Huang
Sorry I forgot to remove the S-o-b of my Google email. Henrik can you help me remove that line if you pick it? Thanks. Wei-Ning On Thu, Oct 12, 2017 at 2:21 PM, Wei-Ning Huang wrote: > From: Wei-Ning Huang > > The current hid-multitouch driver only allow the report of two >

[PATCH v5] HID: hid-multitouch: support fine-grain orientation reporting

2017-10-12 Thread Wei-Ning Huang
From: Wei-Ning Huang <wnhu...@chromium.org> The current hid-multitouch driver only allow the report of two orientations, vertical and horizontal. We use the Azimuth orientation usage 0x3F under the Digitizer usage page to report orientation if the device supports it. Changelog: v1

[PATCH v5] HID: hid-multitouch: support fine-grain orientation reporting

2017-10-12 Thread Wei-Ning Huang
From: Wei-Ning Huang The current hid-multitouch driver only allow the report of two orientations, vertical and horizontal. We use the Azimuth orientation usage 0x3F under the Digitizer usage page to report orientation if the device supports it. Changelog: v1 -> v2: - Fix commit mess

Re: [PATCH v3] HID: hid-multitouch: support fine-grain orientation reporting

2017-10-09 Thread Wei-Ning Huang
ts, Jiri Kosina wrote: >> >> [ adding Benjamin to CC ] >> >> On Thu, 28 Sep 2017, Wei-Ning Huang wrote: >> >> > The current hid-multitouch driver only allow the report of two >> > orientations, vertical and horizontal. We use the Azimuth orientation >&

Re: [PATCH v3] HID: hid-multitouch: support fine-grain orientation reporting

2017-10-09 Thread Wei-Ning Huang
gt; [ adding Benjamin to CC ] >> >> On Thu, 28 Sep 2017, Wei-Ning Huang wrote: >> >> > The current hid-multitouch driver only allow the report of two >> > orientations, vertical and horizontal. We use the Azimuth orientation >> > usage 0x3F under the Digi

[PATCH v4] HID: hid-multitouch: support fine-grain orientation reporting

2017-10-09 Thread Wei-Ning Huang
From: Wei-Ning Huang <wnhu...@chromium.org> The current hid-multitouch driver only allow the report of two orientations, vertical and horizontal. We use the Azimuth orientation usage 0x3F under the Digitizer usage page to report orientation if the device supports it. Changelog: v1

[PATCH v4] HID: hid-multitouch: support fine-grain orientation reporting

2017-10-09 Thread Wei-Ning Huang
From: Wei-Ning Huang The current hid-multitouch driver only allow the report of two orientations, vertical and horizontal. We use the Azimuth orientation usage 0x3F under the Digitizer usage page to report orientation if the device supports it. Changelog: v1 -> v2: - Fix commit mess

[PATCH v3] HID: hid-multitouch: support fine-grain orientation reporting

2017-09-28 Thread Wei-Ning Huang
ion reporting for ABS_MT_ORIENTATION. v2 -> v3: - Fix commit message. Signed-off-by: Wei-Ning Huang <wnhu...@google.com> Reviewed-by: Dmitry Torokhov <d...@chromium.org> --- drivers/hid/hid-multitouch.c | 35 +-- include/linux/hid.h | 1

[PATCH v3] HID: hid-multitouch: support fine-grain orientation reporting

2017-09-28 Thread Wei-Ning Huang
ion reporting for ABS_MT_ORIENTATION. v2 -> v3: - Fix commit message. Signed-off-by: Wei-Ning Huang Reviewed-by: Dmitry Torokhov --- drivers/hid/hid-multitouch.c | 35 +-- include/linux/hid.h | 1 + 2 files changed, 34 insertions(+), 2 deletions(-)

Re: [PATCH] HID: hid-multitouch: support fine-grain orientation reporting

2017-09-28 Thread Wei-Ning Huang
Hi Dmitry, I sent v2 to fix the commit message and orientation. Thanks. https://patchwork.kernel.org/patch/9975565/ Wei-Ning On Wed, Sep 27, 2017 at 1:55 PM, Dmitry Torokhov <d...@chromium.org> wrote: > Hi Wei-Ning, > > On Tue, Sep 26, 2017 at 8:03 PM, Wei-Ning Huang <wn

Re: [PATCH] HID: hid-multitouch: support fine-grain orientation reporting

2017-09-28 Thread Wei-Ning Huang
Hi Dmitry, I sent v2 to fix the commit message and orientation. Thanks. https://patchwork.kernel.org/patch/9975565/ Wei-Ning On Wed, Sep 27, 2017 at 1:55 PM, Dmitry Torokhov wrote: > Hi Wei-Ning, > > On Tue, Sep 26, 2017 at 8:03 PM, Wei-Ning Huang wrote: >> >> The c

[PATCH v2] HID: hid-multitouch: support fine-grain orientation reporting

2017-09-28 Thread Wei-Ning Huang
ion reporting for ABS_MT_ORIENTATION. Signed-off-by: Wei-Ning Huang <wnhu...@google.com> Reviewed-by: Dmitry Torokhov <d...@chromium.org> --- drivers/hid/hid-multitouch.c | 35 +-- include/linux/hid.h | 1 + 2 files changed, 34 insertions(

[PATCH v2] HID: hid-multitouch: support fine-grain orientation reporting

2017-09-28 Thread Wei-Ning Huang
ion reporting for ABS_MT_ORIENTATION. Signed-off-by: Wei-Ning Huang Reviewed-by: Dmitry Torokhov --- drivers/hid/hid-multitouch.c | 35 +-- include/linux/hid.h | 1 + 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/drivers/hid/hid-multitouc

[PATCH] HID: hid-multitouch: support fine-grain orientation reporting

2017-09-26 Thread Wei-Ning Huang
this only if their device supports it. Signed-off-by: Wei-Ning Huang <wnhu...@google.com> Reviewed-by: Dmitry Torokhov <d...@chromium.org> --- drivers/hid/hid-multitouch.c | 38 -- include/linux/hid.h | 1 + 2 files changed, 37 insertions(+),

[PATCH] HID: hid-multitouch: support fine-grain orientation reporting

2017-09-26 Thread Wei-Ning Huang
this only if their device supports it. Signed-off-by: Wei-Ning Huang Reviewed-by: Dmitry Torokhov --- drivers/hid/hid-multitouch.c | 38 -- include/linux/hid.h | 1 + 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/drivers/hid/hid

[PATCH v3] HID: google: add google hammer HID driver

2017-09-07 Thread Wei-Ning Huang
From: Wei-Ning Huang <wnhu...@chromium.org> Add Google hammer HID driver. This driver allow us to control hammer keyboard backlights and support future features. Since current hid-core logic does not allow us to specify different USB interface for binding different driver, some code are

[PATCH v3] HID: google: add google hammer HID driver

2017-09-07 Thread Wei-Ning Huang
From: Wei-Ning Huang Add Google hammer HID driver. This driver allow us to control hammer keyboard backlights and support future features. Since current hid-core logic does not allow us to specify different USB interface for binding different driver, some code are added in HID core to allow us

Re: [PATCH v2] HID: google: add google hammer HID driver

2017-08-17 Thread Wei-Ning Huang
+ Jiri Kosina <ji...@kernel.org>, linux-in...@vger.kernel.org On Fri, Aug 18, 2017 at 2:35 AM, Dmitry Torokhov <d...@google.com> wrote: > On Thu, Aug 17, 2017 at 1:45 AM, Wei-Ning Huang <wnhu...@chromium.org> wrote: >> Add Google hammer HID driver. This driver

Re: [PATCH v2] HID: google: add google hammer HID driver

2017-08-17 Thread Wei-Ning Huang
+ Jiri Kosina , linux-in...@vger.kernel.org On Fri, Aug 18, 2017 at 2:35 AM, Dmitry Torokhov wrote: > On Thu, Aug 17, 2017 at 1:45 AM, Wei-Ning Huang wrote: >> Add Google hammer HID driver. This driver allow us to control hammer >> keyboard backlights and support future feature

[PATCH v2] HID: google: add google hammer HID driver

2017-08-17 Thread Wei-Ning Huang
Add Google hammer HID driver. This driver allow us to control hammer keyboard backlights and support future features. Signed-off-by: Wei-Ning Huang <wnhu...@google.com> --- drivers/hid/Kconfig | 6 +++ drivers/hid/Makefile| 1 + drivers/hid/hid-core.c

[PATCH v2] HID: google: add google hammer HID driver

2017-08-17 Thread Wei-Ning Huang
Add Google hammer HID driver. This driver allow us to control hammer keyboard backlights and support future features. Signed-off-by: Wei-Ning Huang --- drivers/hid/Kconfig | 6 +++ drivers/hid/Makefile| 1 + drivers/hid/hid-core.c | 4 ++ drivers/hid/hid

[PATCH] HID: google: add google hammer HID driver

2017-08-17 Thread Wei-Ning Huang
Add Google hammer HID driver. This driver allow us to control hammer keyboard backlights and support future features. Signed-off-by: Wei-Ning Huang <wnhu...@google.com> --- drivers/hid/Kconfig | 6 +++ drivers/hid/Makefile| 1 + drivers/hid/hid-core.c

[PATCH] HID: google: add google hammer HID driver

2017-08-17 Thread Wei-Ning Huang
Add Google hammer HID driver. This driver allow us to control hammer keyboard backlights and support future features. Signed-off-by: Wei-Ning Huang --- drivers/hid/Kconfig | 6 +++ drivers/hid/Makefile| 1 + drivers/hid/hid-core.c | 4 ++ drivers/hid/hid

[PATCH] HID: multitouch: Add support for Google Rose Touchpad

2017-06-20 Thread Wei-Ning Huang
Add Google Rose Touchpad USB PID and required quirks. Signed-off-by: Wei-Ning Huang <wnhu...@chromium.org> --- drivers/hid/hid-ids.h| 3 +++ drivers/hid/hid-multitouch.c | 12 2 files changed, 15 insertions(+) diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid

[PATCH] HID: multitouch: Add support for Google Rose Touchpad

2017-06-20 Thread Wei-Ning Huang
Add Google Rose Touchpad USB PID and required quirks. Signed-off-by: Wei-Ning Huang --- drivers/hid/hid-ids.h| 3 +++ drivers/hid/hid-multitouch.c | 12 2 files changed, 15 insertions(+) diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 8ca1e8ce0af2

[PATCH v3] cros_ec_i2c: prevent i2c timeout for EC_CMD_FLASH_ERASE

2017-05-15 Thread Wei-Ning Huang
From: Wei-Ning Huang <wnhu...@chromium.org> Some EC chip has larger flash sector size which requires longer erase time. During erase the CPU is usually stalled and can't even respond to interrupts. We sleep a while to block any EC command from executing during the flash erase period. Sign

[PATCH v3] cros_ec_i2c: prevent i2c timeout for EC_CMD_FLASH_ERASE

2017-05-15 Thread Wei-Ning Huang
From: Wei-Ning Huang Some EC chip has larger flash sector size which requires longer erase time. During erase the CPU is usually stalled and can't even respond to interrupts. We sleep a while to block any EC command from executing during the flash erase period. Signed-off-by: Wei-Ning Huang

[PATCH v2] cros_ec_i2c: prevent i2c timeout for EC_CMD_FLASH_ERASE

2017-05-15 Thread Wei-Ning Huang
From: Wei-Ning Huang <wnhu...@chromium.org> Some EC chip has larger flash sector size which requires longer erase time. During erase the CPU is usually stalled and can't even respond to interrupts. We sleep a while to block any EC command from executing during the flash erase period. Sign

[PATCH v2] cros_ec_i2c: prevent i2c timeout for EC_CMD_FLASH_ERASE

2017-05-15 Thread Wei-Ning Huang
From: Wei-Ning Huang Some EC chip has larger flash sector size which requires longer erase time. During erase the CPU is usually stalled and can't even respond to interrupts. We sleep a while to block any EC command from executing during the flash erase period. Signed-off-by: Wei-Ning Huang

[PATCH] cros_ec_i2c: prevent i2c timeout for EC_CMD_FLASH_ERASE

2017-05-15 Thread Wei-Ning Huang
Some EC chip has larger flash sector size which requires longer erase time. During erase the CPU is usually stalled and can't even respond to interrupts. We sleep a while to block any EC command from executing during the flash erase period. Signed-off-by: Wei-Ning Huang <wnhu...@google.

[PATCH] cros_ec_i2c: prevent i2c timeout for EC_CMD_FLASH_ERASE

2017-05-15 Thread Wei-Ning Huang
Some EC chip has larger flash sector size which requires longer erase time. During erase the CPU is usually stalled and can't even respond to interrupts. We sleep a while to block any EC command from executing during the flash erase period. Signed-off-by: Wei-Ning Huang --- drivers/mfd

Re: [PATCH 2/4] sdio: mediatek: Support sdio feature

2017-01-23 Thread Wei-Ning Huang
On Mon, Jan 23, 2017 at 7:24 PM, Wei-Ning Huang <wnhu...@google.com> wrote: > On Tue, Nov 8, 2016 at 2:08 PM, Yong Mao <yong@mediatek.com> wrote: >> From: yong mao <yong@mediatek.com> >> >> 1. Add irqlock to protect accessing the shared r

Re: [PATCH 2/4] sdio: mediatek: Support sdio feature

2017-01-23 Thread Wei-Ning Huang
On Mon, Jan 23, 2017 at 7:24 PM, Wei-Ning Huang wrote: > On Tue, Nov 8, 2016 at 2:08 PM, Yong Mao wrote: >> From: yong mao >> >> 1. Add irqlock to protect accessing the shared register >> 2. Modify the implementation of msdc_card_busy due to SDIO >> 3. Im

Re: [PATCH 2/4] sdio: mediatek: Support sdio feature

2017-01-23 Thread Wei-Ning Huang
2.171368] ksdioirqd/mmc2 (1772) dw_mmc also enables autosuspend but it didn't call any pm_runtime_get* function in it's enable_sdio_irq function, I don't really know how it worked around this. Ulf, any suggestions on how we can do this? Wei-Ning > + msdc_recheck_sdio_irq(host); > + >

Re: [PATCH 2/4] sdio: mediatek: Support sdio feature

2017-01-23 Thread Wei-Ning Huang
_sdio_irq function, I don't really know how it worked around this. Ulf, any suggestions on how we can do this? Wei-Ning > + msdc_recheck_sdio_irq(host); > + > + spin_lock_irqsave(>irqlock, flags); > + sdr_set_bits(host->base + SDC_CFG, SDC_CFG_SDIOIDE); > + sdr_set_bits(host->base + MSDC_INTEN, MSDC_INTEN_SDIOIRQ); > + spin_unlock_irqrestore(>irqlock, flags); > + } else { > + spin_lock_irqsave(>irqlock, flags); > + sdr_clr_bits(host->base + MSDC_INTEN, MSDC_INTEN_SDIOIRQ); > + spin_unlock_irqrestore(>irqlock, flags); > + } > +} > + > static struct mmc_host_ops mt_msdc_ops = { > .post_req = msdc_post_req, > .pre_req = msdc_pre_req, > @@ -1504,6 +1592,7 @@ static void msdc_hw_reset(struct mmc_host *mmc) > .execute_tuning = msdc_execute_tuning, > .prepare_hs400_tuning = msdc_prepare_hs400_tuning, > .hw_reset = msdc_hw_reset, > + .enable_sdio_irq = msdc_enable_sdio_irq, > }; > > static int msdc_drv_probe(struct platform_device *pdev) > @@ -1600,6 +1689,7 @@ static int msdc_drv_probe(struct platform_device *pdev) > mmc_dev(mmc)->dma_mask = >dma_mask; > > host->timeout_clks = 3 * 1048576; > + host->irq_thread_alive = false; > host->dma.gpd = dma_alloc_coherent(>dev, > 2 * sizeof(struct mt_gpdma_desc), > >dma.gpd_addr, GFP_KERNEL); > @@ -1613,6 +1703,7 @@ static int msdc_drv_probe(struct platform_device *pdev) > msdc_init_gpd_bd(host, >dma); > INIT_DELAYED_WORK(>req_timeout, msdc_request_timeout); > spin_lock_init(>lock); > + spin_lock_init(>irqlock); > > platform_set_drvdata(pdev, mmc); > msdc_ungate_clock(host); > -- > 1.7.9.5 > -- Wei-Ning Huang, 黃偉寧 | Software Engineer, Google Inc., Taiwan | wnhu...@google.com | Cell: +886 910-380678

Re: [PATCH] ACPI / button: add support for tablet mode switch

2016-08-31 Thread Wei-Ning Huang
On Wed, Aug 31, 2016 at 4:01 PM, Zhang Rui <rui.zh...@intel.com> wrote: > On 三, 2016-08-31 at 15:33 +0800, Wei-Ning Huang wrote: >> From: Wei-Ning Huang <wnhu...@chromium.org> >> >> ACPI PNP device HID 'PNP0C60' is a device that indicates tablet mode >> stat

Re: [PATCH] ACPI / button: add support for tablet mode switch

2016-08-31 Thread Wei-Ning Huang
On Wed, Aug 31, 2016 at 4:01 PM, Zhang Rui wrote: > On 三, 2016-08-31 at 15:33 +0800, Wei-Ning Huang wrote: >> From: Wei-Ning Huang >> >> ACPI PNP device HID 'PNP0C60' is a device that indicates tablet mode >> status. Add support for mapping this device to the SW_TA

[PATCH] ACPI / button: add support for tablet mode switch

2016-08-31 Thread Wei-Ning Huang
From: Wei-Ning Huang <wnhu...@chromium.org> ACPI PNP device HID 'PNP0C60' is a device that indicates tablet mode status. Add support for mapping this device to the SW_TABLET_MODE input event. Signed-off-by: Wei-Ning Huang <wnhu...@chromium.org> --- drivers/acpi/b

[PATCH] ACPI / button: add support for tablet mode switch

2016-08-31 Thread Wei-Ning Huang
From: Wei-Ning Huang ACPI PNP device HID 'PNP0C60' is a device that indicates tablet mode status. Add support for mapping this device to the SW_TABLET_MODE input event. Signed-off-by: Wei-Ning Huang --- drivers/acpi/button.c | 36 1 file changed, 36

Re: [PATCH] cfg80211/nl80211: add wifi tx power mode switching support

2016-07-07 Thread Wei-Ning Huang
Wei-Ning On Tue, Jun 28, 2016 at 6:57 PM, Johannes Berg <johan...@sipsolutions.net> wrote: > On Thu, 2016-05-12 at 17:34 +0800, Wei-Ning Huang wrote: >> >> Johannes, I feel like being able to set calibration data at runtime >> is something common to all wireless d

Re: [PATCH] cfg80211/nl80211: add wifi tx power mode switching support

2016-07-07 Thread Wei-Ning Huang
Wei-Ning On Tue, Jun 28, 2016 at 6:57 PM, Johannes Berg wrote: > On Thu, 2016-05-12 at 17:34 +0800, Wei-Ning Huang wrote: >> >> Johannes, I feel like being able to set calibration data at runtime >> is something common to all wireless drivers, so instead of using >> v

[PATCH v2] Bluetooth: btmrvl_main: read wakeup-pin and wakeup-gap-ms as u32

2016-06-01 Thread Wei-Ning Huang
in the mwifiex driver. Signed-off-by: Wei-Ning Huang <wnhu...@chromium.org> --- drivers/bluetooth/btmrvl_main.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c index 7ad8d61..b6d3404 100644 --- a/drivers/blu

[PATCH v2] Bluetooth: btmrvl_main: read wakeup-pin and wakeup-gap-ms as u32

2016-06-01 Thread Wei-Ning Huang
in the mwifiex driver. Signed-off-by: Wei-Ning Huang --- drivers/bluetooth/btmrvl_main.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c index 7ad8d61..b6d3404 100644 --- a/drivers/bluetooth/btmrvl_main.c +++ b

Re: [PATCH] dt: bindings: fix documentation for MARVELL's bt-sd8xxx wireless device

2016-06-01 Thread Wei-Ning Huang
Please ignore this patch. I think we should make the driver parse 32 bit value instead (to be consistent with mwifiex driver). On Wed, Jun 1, 2016 at 11:09 AM, Wei-Ning Huang <wnhu...@chromium.org> wrote: > The property marvell,wakeup-pin and marvell,wakeup-gap-ms are read as > u16 i

Re: [PATCH] dt: bindings: fix documentation for MARVELL's bt-sd8xxx wireless device

2016-06-01 Thread Wei-Ning Huang
Please ignore this patch. I think we should make the driver parse 32 bit value instead (to be consistent with mwifiex driver). On Wed, Jun 1, 2016 at 11:09 AM, Wei-Ning Huang wrote: > The property marvell,wakeup-pin and marvell,wakeup-gap-ms are read as > u16 in the driver. Fix documen

[PATCH] Bluetooth: btmrvl_main: read wakeup-pin and gpio_gap as u32

2016-06-01 Thread Wei-Ning Huang
driver. Signed-off-by: Wei-Ning Huang <wnhu...@chromium.org> --- drivers/bluetooth/btmrvl_main.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c index 7ad8d61..b6d3404 100644 --- a/drivers/blu

[PATCH] Bluetooth: btmrvl_main: read wakeup-pin and gpio_gap as u32

2016-06-01 Thread Wei-Ning Huang
driver. Signed-off-by: Wei-Ning Huang --- drivers/bluetooth/btmrvl_main.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c index 7ad8d61..b6d3404 100644 --- a/drivers/bluetooth/btmrvl_main.c +++ b/drivers

[PATCH] dt: bindings: fix documentation for MARVELL's bt-sd8xxx wireless device

2016-05-31 Thread Wei-Ning Huang
The property marvell,wakeup-pin and marvell,wakeup-gap-ms are read as u16 in the driver. Fix documentation and example accordingly. Signed-off-by: Wei-Ning Huang <wnhu...@chromium.org> --- Documentation/devicetree/bindings/net/marvell-bt-sd8xxx.txt | 8 1 file changed, 4 inse

[PATCH] dt: bindings: fix documentation for MARVELL's bt-sd8xxx wireless device

2016-05-31 Thread Wei-Ning Huang
The property marvell,wakeup-pin and marvell,wakeup-gap-ms are read as u16 in the driver. Fix documentation and example accordingly. Signed-off-by: Wei-Ning Huang --- Documentation/devicetree/bindings/net/marvell-bt-sd8xxx.txt | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[PATCH v2] mwifiex: fix race condition when downloading firmware

2016-05-27 Thread Wei-Ning Huang
downloading firmware 3) mwifiex tries to download firmware, but failed because btmrvl is already downloading. This won't happen if 1) and 3) is an atomic action. This patch adds sdio_claim/release_host call around those two actions to make sure it's atomic. Signed-off-by: Wei-Ning Huang <w

[PATCH v2] mwifiex: fix race condition when downloading firmware

2016-05-27 Thread Wei-Ning Huang
downloading firmware 3) mwifiex tries to download firmware, but failed because btmrvl is already downloading. This won't happen if 1) and 3) is an atomic action. This patch adds sdio_claim/release_host call around those two actions to make sure it's atomic. Signed-off-by: Wei-Ning Huang --- drivers/net

[PATCH] mwifiex: fix racing condition when downloading firmware

2016-05-18 Thread Wei-Ning Huang
downloading firmware 3) mwfieix tries to download firmware, but failed because btmrvl is already downloading. This won't happen if 1) and 3) is an atomic action. This patch adds sdio_claim/release_host call around those two actions to make sure it's atomic. Signed-off-by: Wei-Ning Huang <w

[PATCH] mwifiex: fix racing condition when downloading firmware

2016-05-18 Thread Wei-Ning Huang
downloading firmware 3) mwfieix tries to download firmware, but failed because btmrvl is already downloading. This won't happen if 1) and 3) is an atomic action. This patch adds sdio_claim/release_host call around those two actions to make sure it's atomic. Signed-off-by: Wei-Ning Huang --- drivers/net

Re: [PATCH] cfg80211/nl80211: add wifi tx power mode switching support

2016-05-12 Thread Wei-Ning Huang
On Fri, May 13, 2016 at 6:02 AM, Arend van Spriel <arend.vanspr...@broadcom.com> wrote: > On 12-05-16 11:34, Wei-Ning Huang wrote: >> On Thu, May 12, 2016 at 2:33 AM, Dan Williams <d...@redhat.com> wrote: >>> On Wed, 2016-05-11 at 13:03 +0800, Wei-Ning Huang wrote: &g

Re: [PATCH] cfg80211/nl80211: add wifi tx power mode switching support

2016-05-12 Thread Wei-Ning Huang
On Fri, May 13, 2016 at 6:02 AM, Arend van Spriel wrote: > On 12-05-16 11:34, Wei-Ning Huang wrote: >> On Thu, May 12, 2016 at 2:33 AM, Dan Williams wrote: >>> On Wed, 2016-05-11 at 13:03 +0800, Wei-Ning Huang wrote: >>>> On Fri, May 6, 2016 at 4:19

Re: [PATCH] cfg80211/nl80211: add wifi tx power mode switching support

2016-05-12 Thread Wei-Ning Huang
On Thu, May 12, 2016 at 2:33 AM, Dan Williams <d...@redhat.com> wrote: > On Wed, 2016-05-11 at 13:03 +0800, Wei-Ning Huang wrote: >> On Fri, May 6, 2016 at 4:19 PM, Wei-Ning Huang <wnhu...@google.com> >> wrote: >> > >> > On Fri, May 6, 2016 at 12:07

Re: [PATCH] cfg80211/nl80211: add wifi tx power mode switching support

2016-05-12 Thread Wei-Ning Huang
On Thu, May 12, 2016 at 2:33 AM, Dan Williams wrote: > On Wed, 2016-05-11 at 13:03 +0800, Wei-Ning Huang wrote: >> On Fri, May 6, 2016 at 4:19 PM, Wei-Ning Huang >> wrote: >> > >> > On Fri, May 6, 2016 at 12:07 AM, Dan Williams >> > wrote: >> >

Re: [PATCH] cfg80211/nl80211: add wifi tx power mode switching support

2016-05-10 Thread Wei-Ning Huang
On Fri, May 6, 2016 at 4:19 PM, Wei-Ning Huang <wnhu...@google.com> wrote: > On Fri, May 6, 2016 at 12:07 AM, Dan Williams <d...@redhat.com> wrote: >> >> On Thu, 2016-05-05 at 14:44 +0800, Wei-Ning Huang wrote: >> > Recent new hardware has the a

Re: [PATCH] cfg80211/nl80211: add wifi tx power mode switching support

2016-05-10 Thread Wei-Ning Huang
On Fri, May 6, 2016 at 4:19 PM, Wei-Ning Huang wrote: > On Fri, May 6, 2016 at 12:07 AM, Dan Williams wrote: >> >> On Thu, 2016-05-05 at 14:44 +0800, Wei-Ning Huang wrote: >> > Recent new hardware has the ability to switch between tablet mode and >> > clamshell m

[PATCH] mwifiex: fixup error messages

2016-05-10 Thread Wei-Ning Huang
Use dev_err instead of pr_err and add newline character at the end. Signed-off-by: Wei-Ning Huang <wnhu...@chromium.org> --- drivers/net/wireless/marvell/mwifiex/sdio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/d

[PATCH] mwifiex: fixup error messages

2016-05-10 Thread Wei-Ning Huang
Use dev_err instead of pr_err and add newline character at the end. Signed-off-by: Wei-Ning Huang --- drivers/net/wireless/marvell/mwifiex/sdio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell

Re: [PATCH] cfg80211/nl80211: add wifi tx power mode switching support

2016-05-06 Thread Wei-Ning Huang
On Fri, May 6, 2016 at 12:07 AM, Dan Williams <d...@redhat.com> wrote: > > On Thu, 2016-05-05 at 14:44 +0800, Wei-Ning Huang wrote: > > Recent new hardware has the ability to switch between tablet mode and > > clamshell mode. To optimize WiFi performance, we wa

Re: [PATCH] cfg80211/nl80211: add wifi tx power mode switching support

2016-05-06 Thread Wei-Ning Huang
On Fri, May 6, 2016 at 12:07 AM, Dan Williams wrote: > > On Thu, 2016-05-05 at 14:44 +0800, Wei-Ning Huang wrote: > > Recent new hardware has the ability to switch between tablet mode and > > clamshell mode. To optimize WiFi performance, we want to be able to > > use &

[PATCH] cfg80211/nl80211: add wifi tx power mode switching support

2016-05-05 Thread Wei-Ning Huang
for a given wireless interface. Signed-off-by: Wei-Ning Huang <wnhu...@chromium.org> --- include/net/cfg80211.h | 11 +++ include/uapi/linux/nl80211.h | 21 + net/wireless/nl80211.c | 16 net/wireless/rdev-ops.h

[PATCH] cfg80211/nl80211: add wifi tx power mode switching support

2016-05-05 Thread Wei-Ning Huang
for a given wireless interface. Signed-off-by: Wei-Ning Huang --- include/net/cfg80211.h | 11 +++ include/uapi/linux/nl80211.h | 21 + net/wireless/nl80211.c | 16 net/wireless/rdev-ops.h | 22 ++ net/wireless

Re: [PATCH RESEND] mwifiex: fix NULL pointer dereference error

2016-03-30 Thread Wei-Ning Huang
On Wed, Mar 30, 2016 at 8:00 PM, Kalle Valo <kv...@codeaurora.org> wrote: > Wei-Ning Huang <wnhu...@google.com> writes: > >> Kalle, can you help amend the message if this patch is accepted? > > Sure, I'll fix the typo in the commit log. > > But please try to

Re: [PATCH RESEND] mwifiex: fix NULL pointer dereference error

2016-03-30 Thread Wei-Ning Huang
On Wed, Mar 30, 2016 at 8:00 PM, Kalle Valo wrote: > Wei-Ning Huang writes: > >> Kalle, can you help amend the message if this patch is accepted? > > Sure, I'll fix the typo in the commit log. > > But please try to avoid top posting, it makes it more difficult

Re: [PATCH RESEND] mwifiex: fix NULL pointer dereference error

2016-03-30 Thread Wei-Ning Huang
ah.. thanks. Kalle, can you help amend the message if this patch is accepted? Thanks a lot. Wei-Ning On Wed, Mar 30, 2016 at 6:26 PM, Sedat Dilek <sedat.di...@gmail.com> wrote: > On Wed, Mar 30, 2016 at 12:14 PM, Wei-Ning Huang <wnhu...@chromium.org> wrote: >> In mwifi

Re: [PATCH RESEND] mwifiex: fix NULL pointer dereference error

2016-03-30 Thread Wei-Ning Huang
ah.. thanks. Kalle, can you help amend the message if this patch is accepted? Thanks a lot. Wei-Ning On Wed, Mar 30, 2016 at 6:26 PM, Sedat Dilek wrote: > On Wed, Mar 30, 2016 at 12:14 PM, Wei-Ning Huang wrote: >> In mwifiex_enable_hs, we need to check if >> priv->wdev.wi

[PATCH RESEND] mwifiex: fix NULL pointer dereference error

2016-03-30 Thread Wei-Ning Huang
In mwifiex_enable_hs, we need to check if priv->wdev.wiphy->wowlan_config is NULL before accessing it's member. This sometimes cause kernel panic when suspend/resume. Signed-off-by: Wei-Ning Huang <wnhu...@chromium.org> --- drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 3 ++- 1

[PATCH RESEND] mwifiex: fix NULL pointer dereference error

2016-03-30 Thread Wei-Ning Huang
In mwifiex_enable_hs, we need to check if priv->wdev.wiphy->wowlan_config is NULL before accessing it's member. This sometimes cause kernel panic when suspend/resume. Signed-off-by: Wei-Ning Huang --- drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 3 ++- 1 file changed, 2 insertions

Re: [PATCH] CHROMIUM: mwifiex: fix NULL pointer dereference error

2016-03-30 Thread Wei-Ning Huang
Sorry, please ignore this one. I forgot to strip the CHROMIUM: tag. Wei-Ning On Wed, Mar 30, 2016 at 6:08 PM, Wei-Ning Huang <wnhu...@chromium.org> wrote: > In mwifiex_enable_hs, we need to check if > priv->wdev.wiphy->wowlan_config is NULL before accessing it's member. >

[PATCH] CHROMIUM: mwifiex: fix NULL pointer dereference error

2016-03-30 Thread Wei-Ning Huang
In mwifiex_enable_hs, we need to check if priv->wdev.wiphy->wowlan_config is NULL before accessing it's member. This sometimes cause kernel panic when suspend/resume. Signed-off-by: Wei-Ning Huang <wnhu...@chromium.org> --- drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 3 ++- 1

Re: [PATCH] CHROMIUM: mwifiex: fix NULL pointer dereference error

2016-03-30 Thread Wei-Ning Huang
Sorry, please ignore this one. I forgot to strip the CHROMIUM: tag. Wei-Ning On Wed, Mar 30, 2016 at 6:08 PM, Wei-Ning Huang wrote: > In mwifiex_enable_hs, we need to check if > priv->wdev.wiphy->wowlan_config is NULL before accessing it's member. > This sometimes cause ke

[PATCH] CHROMIUM: mwifiex: fix NULL pointer dereference error

2016-03-30 Thread Wei-Ning Huang
In mwifiex_enable_hs, we need to check if priv->wdev.wiphy->wowlan_config is NULL before accessing it's member. This sometimes cause kernel panic when suspend/resume. Signed-off-by: Wei-Ning Huang --- drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 3 ++- 1 file changed, 2 insertions

Re: [PATCH] mwifiex: advertise low priority scan feature

2016-03-29 Thread Wei-Ning Huang
I've resent the patch here: https://patchwork.kernel.org/patch/8637861/ Thanks! Wei-Ning On Tue, Mar 22, 2016 at 12:12 PM, Wei-Ning Huang <wnhu...@google.com> wrote: > Hi Kalle, > > Thanks for the review. I accidentally removed the s-o-b line from > akarwar in this version. &g

Re: [PATCH] mwifiex: advertise low priority scan feature

2016-03-29 Thread Wei-Ning Huang
I've resent the patch here: https://patchwork.kernel.org/patch/8637861/ Thanks! Wei-Ning On Tue, Mar 22, 2016 at 12:12 PM, Wei-Ning Huang wrote: > Hi Kalle, > > Thanks for the review. I accidentally removed the s-o-b line from > akarwar in this version. > The original pat

Re: [PATCH] mwifiex: add __GFP_REPEAT to skb allocation call

2016-03-29 Thread Wei-Ning Huang
urora.org> wrote: > Wei-Ning Huang <wnhu...@chromium.org> writes: > >> "single skb allocation failure" happens when system is under heavy >> memory pressure. Add __GFP_REPEAT to skb allocation call so kernel >> attempts to reclaim pages and retry the a

Re: [PATCH] mwifiex: add __GFP_REPEAT to skb allocation call

2016-03-29 Thread Wei-Ning Huang
memory compaction and retry allocation. Maybe Amit@marvell can comment on if this is a good fix on this issue. I'm also aware that marvell is the progress of implementing scatter/gatter for mwifiex, which can also fix the issue. Wei-Ning On Tue, Mar 29, 2016 at 4:37 PM, Kalle Valo wrote: > Wei-N

[PATCH] mwifiex: add __GFP_REPEAT to skb allocation call

2016-03-28 Thread Wei-Ning Huang
"single skb allocation failure" happens when system is under heavy memory pressure. Add __GFP_REPEAT to skb allocation call so kernel attempts to reclaim pages and retry the allocation. Signed-off-by: Wei-Ning Huang <wnhu...@chromium.org> --- drivers/net/wireless/marvell/mwi

[PATCH] mwifiex: add __GFP_REPEAT to skb allocation call

2016-03-28 Thread Wei-Ning Huang
"single skb allocation failure" happens when system is under heavy memory pressure. Add __GFP_REPEAT to skb allocation call so kernel attempts to reclaim pages and retry the allocation. Signed-off-by: Wei-Ning Huang --- drivers/net/wireless/marvell/mwifiex/sdio.c | 12 --

Re: [PATCH v2] mwifiex: advertise low priority scan feature

2016-03-21 Thread Wei-Ning Huang
Tested-by: Wei-Ning Huang <wnhu...@chromium.org> On Tue, Mar 22, 2016 at 12:09 PM, Wei-Ning Huang <wnhu...@chromium.org> wrote: > From: Amitkumar Karwar <akar...@marvell.com> > > Low priority scan handling code which delays or aborts scan > operation based on

Re: [PATCH v2] mwifiex: advertise low priority scan feature

2016-03-21 Thread Wei-Ning Huang
Tested-by: Wei-Ning Huang On Tue, Mar 22, 2016 at 12:09 PM, Wei-Ning Huang wrote: > From: Amitkumar Karwar > > Low priority scan handling code which delays or aborts scan > operation based on Tx traffic is removed recently. The reason > is firmware already takes care of it in

Re: [PATCH] mwifiex: advertise low priority scan feature

2016-03-21 Thread Wei-Ning Huang
wrote: > Wei-Ning Huang <wnhu...@chromium.org> writes: > >> From: Amitkumar Karwar <akar...@marvell.com> >> >> Low priority scan handling code which delays or aborts scan >> operation based on Tx traffic is removed recently. The reason >> is fir

Re: [PATCH] mwifiex: advertise low priority scan feature

2016-03-21 Thread Wei-Ning Huang
Hi Kalle, Thanks for the review. I accidentally removed the s-o-b line from akarwar in this version. The original patch can be found at: https://chromium-review.googlesource.com/#/c/246052/ I've resent a new one. Wei-Ning On Mon, Mar 21, 2016 at 6:28 PM, Kalle Valo wrote: > Wei-Ning Hu

[PATCH v2] mwifiex: advertise low priority scan feature

2016-03-21 Thread Wei-Ning Huang
upport to cfg80211. This patch fixes a problem in which OBSS scan request from wpa_supplicant was being rejected by cfg80211. Signed-off-by: Amitkumar Karwar <akar...@marvell.com> Signed-off-by: Wei-Ning Huang <wnhu...@chromium.org> --- drivers/net/wireless/marvell/mwifiex/cfg80211.c | 1

[PATCH v2] mwifiex: advertise low priority scan feature

2016-03-21 Thread Wei-Ning Huang
fixes a problem in which OBSS scan request from wpa_supplicant was being rejected by cfg80211. Signed-off-by: Amitkumar Karwar Signed-off-by: Wei-Ning Huang --- drivers/net/wireless/marvell/mwifiex/cfg80211.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/marvell

Re: [PATCH] mwifiex: advertise low priority scan feature

2016-03-21 Thread Wei-Ning Huang
Tested-by: Wei-Ning Huang <wnhu...@chromium.org> On Mon, Mar 21, 2016 at 4:07 PM, Wei-Ning Huang <wnhu...@chromium.org> wrote: > From: Amitkumar Karwar <akar...@marvell.com> > > Low priority scan handling code which delays or aborts scan > operation based on

Re: [PATCH] mwifiex: advertise low priority scan feature

2016-03-21 Thread Wei-Ning Huang
Tested-by: Wei-Ning Huang On Mon, Mar 21, 2016 at 4:07 PM, Wei-Ning Huang wrote: > From: Amitkumar Karwar > > Low priority scan handling code which delays or aborts scan > operation based on Tx traffic is removed recently. The reason > is firmware already takes care of it in

[PATCH] mwifiex: advertise low priority scan feature

2016-03-21 Thread Wei-Ning Huang
upport to cfg80211. This patch fixes a problem in which OBSS scan request from wpa_supplicant was being rejected by cfg80211. Signed-off-by: Wei-Ning Huang <wnhu...@chromium.org> --- drivers/net/wireless/marvell/mwifiex/cfg80211.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/

[PATCH] mwifiex: advertise low priority scan feature

2016-03-21 Thread Wei-Ning Huang
fixes a problem in which OBSS scan request from wpa_supplicant was being rejected by cfg80211. Signed-off-by: Wei-Ning Huang --- drivers/net/wireless/marvell/mwifiex/cfg80211.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net

[PATCH] Bluetooth: btmrvl_sdio: fix firmware activation failure

2016-03-07 Thread Wei-Ning Huang
From: Wei-Ning Huang <wnhu...@chromium.org> In some case, the btmrvl_sdio firmware would fail to active within the polling time. Increase the polling interval to 100 msec to fix the issue. Signed-off-by: Wei-Ning Huang <wnhu...@chromium.org> Signed-off-by: Wei-Ning Huang <wnh

[PATCH] Bluetooth: btmrvl_sdio: fix firmware activation failure

2016-03-07 Thread Wei-Ning Huang
From: Wei-Ning Huang In some case, the btmrvl_sdio firmware would fail to active within the polling time. Increase the polling interval to 100 msec to fix the issue. Signed-off-by: Wei-Ning Huang Signed-off-by: Wei-Ning Huang --- drivers/bluetooth/btmrvl_sdio.c | 2 +- 1 file changed, 1

[PATCH] Bluetooth: hci_core: cancel power off delayed work properly

2016-02-15 Thread Wei-Ning Huang
From: Wei-Ning Huang <wnhu...@chromium.org> When the HCI_AUTO_OFF flag is cleared, the power_off delayed work need to be cancel or HCI will be powered off even if it's managed. Signed-off-by: Wei-Ning Huang <wnhu...@chromium.org> --- net/bluetooth/hci_core.c | 1 + 1 file changed,

[PATCH] Bluetooth: hci_core: cancel power off delayed work properly

2016-02-15 Thread Wei-Ning Huang
From: Wei-Ning Huang When the HCI_AUTO_OFF flag is cleared, the power_off delayed work need to be cancel or HCI will be powered off even if it's managed. Signed-off-by: Wei-Ning Huang --- net/bluetooth/hci_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/bluetooth/hci_core.c b

[PATCH] rtc-mt6397: enable wakeup before registering rtc device

2015-07-02 Thread Wei-Ning Huang
rtc_sysfs_add_device checks if device can wakeup before creating the wakealarm file in sysfs. Thus the driver must set wakeup capability before registering the rtc device. Signed-off-by: Wei-Ning Huang --- drivers/rtc/rtc-mt6397.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH] rtc-mt6397: enable wakeup before registering rtc device

2015-07-02 Thread Wei-Ning Huang
rtc_sysfs_add_device checks if device can wakeup before creating the wakealarm file in sysfs. Thus the driver must set wakeup capability before registering the rtc device. Signed-off-by: Wei-Ning Huang wnhu...@google.com --- drivers/rtc/rtc-mt6397.c | 4 ++-- 1 file changed, 2 insertions(+), 2