Re: [PATCH] virtio_pmem: Add freeze/restore callbacks

2024-09-23 Thread Philip Chen
Hi maintainers, Are there any other concerns I should address for this patch? On Mon, Sep 9, 2024 at 4:52 PM Philip Chen wrote: > > Hi > > On Wed, Sep 4, 2024 at 10:54 AM Ira Weiny wrote: > > > > Philip Chen wrote: > > > Hi maintainers, > > > > &

Re: [PATCH] virtio_pmem: Add freeze/restore callbacks

2024-09-09 Thread Philip Chen
Hi On Wed, Sep 4, 2024 at 10:54 AM Ira Weiny wrote: > > Philip Chen wrote: > > Hi maintainers, > > > > Can anyone let me know if this patch makes sense? > > Any comment/feedback is appreciated. > > Thanks in advance! > > I'm not an expert on vir

[PATCH v3] virtio_pmem: Check device status before requesting flush

2024-08-26 Thread Philip Chen
If a pmem device is in a bad status, the driver side could wait for host ack forever in virtio_pmem_flush(), causing the system to hang. So add a status check in the beginning of virtio_pmem_flush() to return early if the device is not activated. Signed-off-by: Philip Chen --- v3: - Fix a typo

Re: [PATCH] virtio_pmem: Add freeze/restore callbacks

2024-08-23 Thread Philip Chen
Hi maintainers, Can anyone let me know if this patch makes sense? Any comment/feedback is appreciated. Thanks in advance! On Wed, Aug 14, 2024 at 5:46 PM Philip Chen wrote: > > Add basic freeze/restore PM callbacks to support hibernation (S4): > - On freeze, delete vq and quiesce the

Re: [PATCH v2] virtio_pmem: Check device status before requesting flush

2024-08-21 Thread Philip Chen
Hi On Wed, Aug 21, 2024 at 1:37 PM Ira Weiny wrote: > > Philip Chen wrote: > > Hi, > > > > On Tue, Aug 20, 2024 at 1:01 PM Dave Jiang wrote: > > > > > > > > > > > > On 8/20/24 10:22 AM, Philip Chen wrote: > > > > If a pme

Re: [PATCH v2] virtio_pmem: Check device status before requesting flush

2024-08-20 Thread Philip Chen
Hi, On Tue, Aug 20, 2024 at 1:01 PM Dave Jiang wrote: > > > > On 8/20/24 10:22 AM, Philip Chen wrote: > > If a pmem device is in a bad status, the driver side could wait for > > host ack forever in virtio_pmem_flush(), causing the system to hang. > > > > So ad

Re: [PATCH] virtio_pmem: Check device status before requesting flush

2024-08-20 Thread Philip Chen
Hi, On Tue, Aug 20, 2024 at 7:23 AM Ira Weiny wrote: > > Philip Chen wrote: > > On Mon, Aug 19, 2024 at 2:56 PM Ira Weiny wrote: > > > > > > Philip Chen wrote: > > > > If a pmem device is in a bad status, the driver side could wait for > > >

[PATCH v2] virtio_pmem: Check device status before requesting flush

2024-08-20 Thread Philip Chen
If a pmem device is in a bad status, the driver side could wait for host ack forever in virtio_pmem_flush(), causing the system to hang. So add a status check in the beginning of virtio_pmem_flush() to return early if the device is not activated. Signed-off-by: Philip Chen --- v2: - Remove

Re: [PATCH] virtio_pmem: Check device status before requesting flush

2024-08-19 Thread Philip Chen
On Mon, Aug 19, 2024 at 2:56 PM Ira Weiny wrote: > > Philip Chen wrote: > > If a pmem device is in a bad status, the driver side could wait for > > host ack forever in virtio_pmem_flush(), causing the system to hang. > > I assume this was supposed to be v2 and you re

[PATCH v2] virtio_pmem: Check device status before requesting flush

2024-08-14 Thread Philip Chen
If a pmem device is in a bad status, the driver side could wait for host ack forever in virtio_pmem_flush(), causing the system to hang. Signed-off-by: Philip Chen --- Change since v1: - Remove change id from the patch description drivers/nvdimm/nd_virtio.c | 9 + 1 file changed, 9

[PATCH] virtio_pmem: Check device status before requesting flush

2024-08-14 Thread Philip Chen
If a pmem device is in a bad status, the driver side could wait for host ack forever in virtio_pmem_flush(), causing the system to hang. Signed-off-by: Philip Chen --- drivers/nvdimm/nd_virtio.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/nvdimm/nd_virtio.c b/drivers

[PATCH] virtio_pmem: Add freeze/restore callbacks

2024-08-14 Thread Philip Chen
Add basic freeze/restore PM callbacks to support hibernation (S4): - On freeze, delete vq and quiesce the device to prepare for snapshotting. - On restore, re-init vq and mark DRIVER_OK. Signed-off-by: Philip Chen --- drivers/nvdimm/virtio_pmem.c | 24 1 file changed

[PATCH] virtio_pmem: Check device status before requesting flush

2024-08-14 Thread Philip Chen
If a pmem device is in a bad status, the driver side could wait for host ack forever in virtio_pmem_flush(), causing the system to hang. Change-Id: Icc1d0a4405359fb5364751031589d15a455f849b Signed-off-by: Philip Chen --- drivers/nvdimm/nd_virtio.c | 9 + 1 file changed, 9 insertions

Re: [PATCH v6 3/3] dt-bindings: input: Fix the keymap for LOCK key

2021-02-04 Thread Philip Chen
Hi maintainers, Friendly ping - can we actually land patch series v6? Or do you expect any update from me? On Fri, Jan 15, 2021 at 2:39 PM Stephen Boyd wrote: > > Quoting Philip Chen (2021-01-15 14:36:17) > > Decouple LOCK from F13 and directly map the LOCK key (KSI3/KSO9) to &

Re: [PATCH v7 2/2] Input: cros-ec-keyb - Expose function row physical map to userspace

2021-02-04 Thread Philip Chen
Hi maintainers, Friendly ping - can we actually land patch series v7? Or do you expect any update from me? On Fri, Jan 15, 2021 at 12:34 PM Stephen Boyd wrote: > > Quoting Philip Chen (2021-01-15 12:24:30) > > The top-row keys in a keyboard usually have dual functionalities. > &g

Re: [PATCH v6 1/3] dt-bindings: input: Create macros for cros-ec keymap

2021-01-15 Thread Philip Chen
On Fri, Jan 15, 2021 at 2:38 PM Stephen Boyd wrote: > > Quoting Philip Chen (2021-01-15 14:36:15) > > In Chrome OS, the keyboard matrix can be split to two groups: > > > > The keymap for the top row keys can be customized based on OEM > > preference, while the keymap

[PATCH v6 3/3] dt-bindings: input: Fix the keymap for LOCK key

2021-01-15 Thread Philip Chen
Decouple LOCK from F13 and directly map the LOCK key (KSI3/KSO9) to KEY_SLEEP action key code. Signed-off-by: Philip Chen --- Changes in v6: - New patch in v6 include/dt-bindings/input/cros-ec-keyboard.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/dt

[PATCH v6 2/3] ARM: dts: cros-ec-keyboard: Use keymap macros

2021-01-15 Thread Philip Chen
The common cros-ec keymap has been defined as macros. This patch uses the macros to simply linux,keymap in cros-ec-keyboard.dtsi file. This patch also creates an alias for keyboard-controller to make it easier to override the keymap in board-specific dts later. Signed-off-by: Philip Chen

[PATCH v6 1/3] dt-bindings: input: Create macros for cros-ec keymap

2021-01-15 Thread Philip Chen
the generic portion of keymap when we override the keymap in the board-specific dts for custom top row design. Signed-off-by: Philip Chen --- (no changes since v2) Changes in v2: - Rename CROS_STD_NON_TOP_ROW_KEYMAP to CROS_STD_MAIN_KEYMAP include/dt-bindings/input/cros-ec-keyboard.h | 103

[PATCH v7 2/2] Input: cros-ec-keyb - Expose function row physical map to userspace

2021-01-15 Thread Philip Chen
be present when the device has a custom design for the top-row keys. Signed-off-by: Philip Chen --- (no changes since v6) Changes in v6: - add to Documentation/ABI - update cros_ec_keyb_register_matrix() to improve readability Changes in v5: - change the data type for a few loca

[PATCH v7 1/2] dt-bindings: input: cros-ec-keyb: Add a new property

2021-01-15 Thread Philip Chen
Add a new property `function-row-physmap` to the device tree for the custom keyboard top row design. The property describes the rows/columns of the top row keys from left to right. Signed-off-by: Philip Chen --- Changes in v7: - Use MATRIX_KEY macro to describe `function-row-physmap` Changes

Re: [PATCH v6 1/2] dt-bindings: input: cros-ec-keyb: Add a new property

2021-01-15 Thread Philip Chen
On Thu, Jan 14, 2021 at 6:38 PM Stephen Boyd wrote: > > Quoting Philip Chen (2021-01-14 18:30:30) > > Add a new property `function-row-physmap` to the > > device tree for the custom keyboard top row design. > > > > The property describes the rows/columns of the top r

Re: [PATCH v5 2/2] Input: cros-ec-keyb - Expose function row physical map to userspace

2021-01-14 Thread Philip Chen
On Wed, Jan 13, 2021 at 5:36 PM Stephen Boyd wrote: > > Quoting Philip Chen (2021-01-13 17:25:13) > > diff --git a/drivers/input/keyboard/cros_ec_keyb.c > > b/drivers/input/keyboard/cros_ec_keyb.c > > index b379ed7628781..273e3c9ba0b03 100644 > > --- a/drivers

[PATCH v6 2/2] Input: cros-ec-keyb - Expose function row physical map to userspace

2021-01-14 Thread Philip Chen
be present when the device has a custom design for the top-row keys. Signed-off-by: Philip Chen --- Changes in v6: - add to Documentation/ABI - update cros_ec_keyb_register_matrix() to improve readability Changes in v5: - change the data type for a few local variables - update function_ro

[PATCH v6 1/2] dt-bindings: input: cros-ec-keyb: Add a new property

2021-01-14 Thread Philip Chen
Add a new property `function-row-physmap` to the device tree for the custom keyboard top row design. The property describes the rows/columns of the top row keys from left to right. Signed-off-by: Philip Chen --- Changes in v6: - remove $ref and add `function-row-physmap` to the example

Re: [PATCH v4 2/2] Input: cros-ec-keyb - Expose function row physical map to userspace

2021-01-13 Thread Philip Chen
On Wed, Jan 13, 2021 at 5:39 PM Stephen Boyd wrote: > > Quoting Philip Chen (2021-01-13 17:29:05) > > On Wed, Jan 13, 2021 at 3:14 PM Stephen Boyd wrote: > > > > > > Quoting Philip Chen (2021-01-13 14:47:18) > > > > On Tue, Jan 12, 202

Re: [PATCH v5 1/2] dt-bindings: input: cros-ec-keyb: Add a new property

2021-01-13 Thread Philip Chen
On Wed, Jan 13, 2021 at 5:30 PM Stephen Boyd wrote: > > Quoting Philip Chen (2021-01-13 17:25:12) > > This patch adds a new property `function-row-physmap` to the > > :) Sorry, I'll make it imperative tense. > > > device tree for the custom keyboard top row design

[PATCH v5 1/2] dt-bindings: input: Create macros for cros-ec keymap

2021-01-13 Thread Philip Chen
the generic portion of keymap when we override the keymap in the board-specific dts for custom top row design. Signed-off-by: Philip Chen --- (no changes since v2) Changes in v2: - Rename CROS_STD_NON_TOP_ROW_KEYMAP to CROS_STD_MAIN_KEYMAP include/dt-bindings/input/cros-ec-keyboard.h | 103

[PATCH v5 2/2] ARM: dts: cros-ec-keyboard: Use keymap macros

2021-01-13 Thread Philip Chen
The common cros-ec keymap has been defined as macros. This patch uses the macros to simply linux,keymap in cros-ec-keyboard.dtsi file. This patch also creates an alias for keyboard-controller to make it easier to override the keymap in board-specific dts later. Signed-off-by: Philip Chen

Re: [PATCH v4 2/2] ARM: dts: cros-ec-keyboard: Use keymap marcos

2021-01-13 Thread Philip Chen
On Mon, Jan 11, 2021 at 6:07 PM Stephen Boyd wrote: > > BTW, subject says 'marcos' when it should say 'macros' Thanks - I fixed it in v5. > > Quoting Philip Chen (2021-01-08 17:23:32) > > The common cros-ec keymap has been defined as macros. This patch uses

Re: [PATCH v4 2/2] Input: cros-ec-keyb - Expose function row physical map to userspace

2021-01-13 Thread Philip Chen
On Tue, Jan 12, 2021 at 10:49 PM Stephen Boyd wrote: > > Quoting Philip Chen (2021-01-12 15:55:28) > > On Mon, Jan 11, 2021 at 6:24 PM Stephen Boyd wrote: > > > > > > Quoting Philip Chen (2021-01-07 15:42:09) > > > > The top-row keys in a keyboard usua

Re: [PATCH v4 2/2] Input: cros-ec-keyb - Expose function row physical map to userspace

2021-01-13 Thread Philip Chen
On Wed, Jan 13, 2021 at 3:14 PM Stephen Boyd wrote: > > Quoting Philip Chen (2021-01-13 14:47:18) > > On Tue, Jan 12, 2021 at 10:49 PM Stephen Boyd wrote: > > > > > > Quoting Philip Chen (2021-01-12 15:55:28) > > > > On Mon, Jan 11, 20

[PATCH v5 2/2] Input: cros-ec-keyb - Expose function row physical map to userspace

2021-01-13 Thread Philip Chen
will only be present when the device has a custom design for the top-row keys. Signed-off-by: Philip Chen --- Changes in v5: - change the data type for a few local variables - update function_row_physmap_show() and cros_ec_keyb_register_matrix() to improve readability/efficiency Chan

[PATCH v5 1/2] dt-bindings: input: cros-ec-keyb: Add a new property

2021-01-13 Thread Philip Chen
This patch adds a new property `function-row-physmap` to the device tree for the custom keyboard top row design. The property describes the rows/columns of the top row keys from left to right. Signed-off-by: Philip Chen --- Changes in v5: - add minItems and maxItems for `function-row-physmap

Re: [PATCH v4 2/2] Input: cros-ec-keyb - Expose function row physical map to userspace

2021-01-12 Thread Philip Chen
On Mon, Jan 11, 2021 at 6:24 PM Stephen Boyd wrote: > > Quoting Philip Chen (2021-01-07 15:42:09) > > The top-row keys in a keyboard usually have dual functionalities. > > E.g. A function key "F1" is also an action key "Browser back". > > > > The

Re: [PATCH v4 1/2] dt-bindings: input: cros-ec-keyb: Add a new property

2021-01-12 Thread Philip Chen
On Mon, Jan 11, 2021 at 6:10 PM Stephen Boyd wrote: > > Quoting Philip Chen (2021-01-07 15:42:08) > > This patch adds a new property `function-row-physmap` to the > > From Documentation/process/submitting-patches.rst > > Describe your changes in imperative mood, e

[PATCH v4 1/2] dt-bindings: input: Create macros for cros-ec keymap

2021-01-08 Thread Philip Chen
the generic portion of keymap when we override the keymap in the board-specific dts for custom top row design. Signed-off-by: Philip Chen --- (no changes since v2) Changes in v2: - Rename CROS_STD_NON_TOP_ROW_KEYMAP to CROS_STD_MAIN_KEYMAP include/dt-bindings/input/cros-ec-keyboard.h | 103

[PATCH v4 2/2] ARM: dts: cros-ec-keyboard: Use keymap marcos

2021-01-08 Thread Philip Chen
The common cros-ec keymap has been defined as macros. This patch uses the macros to simply linux,keymap in cros-ec-keyboard.dtsi file. This patch also creates an alias for keyboard-controller to make it easier to override the keymap in board-specific dts later. Signed-off-by: Philip Chen

[PATCH v3 1/2] dt-bindings: input: Create macros for cros-ec keymap

2021-01-08 Thread Philip Chen
the generic portion of keymap when we override the keymap in the board-specific dts for custom top row design. Signed-off-by: Philip Chen --- (no changes since v2) Changes in v2: - Rename CROS_STD_NON_TOP_ROW_KEYMAP to CROS_STD_MAIN_KEYMAP include/dt-bindings/input/cros-ec-keyboard.h | 103

[PATCH v3 2/2] ARM: dts: cros-ec-keyboard: Use keymap marcos

2021-01-08 Thread Philip Chen
The common cros-ec keymap has been defined as macros. This patch uses the macros to simply linux,keymap in cros-ec-keyboard.dtsi file. This patch also creates an alias for keyboard-controller to make it easier to override the keymap in board-specific dts later. Signed-off-by: Philip Chen

[PATCH v2 2/2] ARM: dts: cros-ec-keyboard: Use keymap marcos

2021-01-08 Thread Philip Chen
The common cros-ec keymap has been defined as macros. This patch uses the macros to simply linux,keymap in cros-ec-keyboard.dtsi file. Signed-off-by: Philip Chen --- Changes in v2: - Replace CROS_STD_NON_TOP_ROW_KEYMAP with CROS_STD_MAIN_KEYMAP arch/arm/boot/dts/cros-ec-keyboard.dtsi | 91

[PATCH v2 1/2] dt-bindings: input: Create macros for cros-ec keymap

2021-01-08 Thread Philip Chen
the generic portion of keymap when we override the keymap in the board-specific dts for custom top row design. Signed-off-by: Philip Chen --- Changes in v2: - Rename CROS_STD_NON_TOP_ROW_KEYMAP to CROS_STD_MAIN_KEYMAP include/dt-bindings/input/cros-ec-keyboard.h | 103 +++ 1 file

[PATCH 2/2] ARM: dts: cros-ec-keyboard: use keymap marcos

2021-01-08 Thread Philip Chen
The common cros-ec keymap has been defined as macros. This patch uses the macros to simply linux,keymap in cros-ec-keyboard.dtsi file. Signed-off-by: Philip Chen --- arch/arm/boot/dts/cros-ec-keyboard.dtsi | 91 + 1 file changed, 3 insertions(+), 88 deletions(-) diff

[PATCH 1/2] dt-bindings: input: Create macros for cros-ec keymap

2021-01-08 Thread Philip Chen
the generic portion of keymap when we override the keymap in the board-specific dts for custom top row design. Signed-off-by: Philip Chen --- include/dt-bindings/input/cros-ec-keyboard.h | 103 +++ 1 file changed, 103 insertions(+) create mode 100644 include/dt-bindings/input/cros

[PATCH v4 1/2] dt-bindings: input: cros-ec-keyb: Add a new property

2021-01-07 Thread Philip Chen
This patch adds a new property `function-row-physmap` to the device tree for the custom keyboard top row design. The property describes the rows/columns of the top row keys from left to right. Signed-off-by: Philip Chen --- (no changes since v2) Changes in v2: - add `function-row-physmap

[PATCH v4 2/2] Input: cros-ec-keyb - Expose function row physical map to userspace

2021-01-07 Thread Philip Chen
will only be present when the device has a custom design for the top-row keys. Signed-off-by: Philip Chen --- Changes in v4: - replace sysfs_create_group() with devm_device_add_group() - remove an unused member in struct cros_ec_keyb Changes in v3: - parse `function-row-physmap` from DT ea

[PATCH v3 2/2] Input: cros-ec-keyb - Expose function row physical map to userspace

2021-01-04 Thread Philip Chen
will only be present when the device has a custom design for the top-row keys. Signed-off-by: Philip Chen --- Changes in v3: - parse `function-row-physmap` from DT earlier, when we probe cros_ec_keyb, and then store the extracted info in struct cros_ec_keyb. Changes in v2: - create function-row-p

[PATCH v3 1/2] dt-bindings: input: cros-ec-keyb: Add a new property

2021-01-04 Thread Philip Chen
This patch adds a new property `function-row-physmap` to the device tree for the custom keyboard top row design. The property describes the rows/columns of the top row keys from left to right. Signed-off-by: Philip Chen --- (no changes since v2) Changes in v2: - add `function-row-physmap

[PATCH v2 2/2] Input: cros-ec-keyb - Expose function row physical map to userspace

2021-01-04 Thread Philip Chen
will only be present when the device has a custom design for the top-row keys. Signed-off-by: Philip Chen --- Changes in v2: - create function-row-physmap file in sysfs by parsing `function-row-physmap` property from DT - assume the device already has a correct keymap to reflect the custom t

[PATCH v2 1/2] dt-bindings: input: cros-ec-keyb: Add a new property

2021-01-04 Thread Philip Chen
This patch adds a new property `function-row-physmap` to the device tree for the custom keyboard top row design. The property describes the rows/columns of the top row keys from left to right. Signed-off-by: Philip Chen --- Changes in v2: - add `function-row-physmap` instead of `google,custom

Re: [PATCH 1/3] dt-bindings: input: cros-ec-keyb: Add a new property

2021-01-04 Thread Philip Chen
Hi Dmitry, On Sun, Jan 3, 2021 at 2:48 PM Dmitry Torokhov wrote: > > Hi Philip, > > On Sat, Jan 02, 2021 at 10:11:21PM -0800, Philip Chen wrote: > > Hi Dmitry, > > > > I have one more question below. > > Could you take a look? > > > > O

Re: [PATCH 1/3] dt-bindings: input: cros-ec-keyb: Add a new property

2021-01-02 Thread Philip Chen
Hi Dmitry, I have one more question below. Could you take a look? On Sat, Jan 2, 2021 at 8:53 PM Philip Chen wrote: > > Hi Dmitry, > > I see. > I'll update these patch sets shortly based on your suggestion. > Thanks. > > On Sat, Jan 2, 2021 at 1:04 PM Dmitry Toro

Re: [PATCH 1/3] dt-bindings: input: cros-ec-keyb: Add a new property

2021-01-02 Thread Philip Chen
Hi Dmitry, I see. I'll update these patch sets shortly based on your suggestion. Thanks. On Sat, Jan 2, 2021 at 1:04 PM Dmitry Torokhov wrote: > > On Sat, Jan 02, 2021 at 11:39:34AM -0800, Philip Chen wrote: > > Hi Dmitry, > > > > Thanks for reviewing my

Re: [PATCH 1/3] dt-bindings: input: cros-ec-keyb: Add a new property

2021-01-02 Thread Philip Chen
Hi Dmitry, Thanks for reviewing my patch over the holiday season. Please check my CIL. On Mon, Dec 28, 2020 at 10:18 PM Dmitry Torokhov wrote: > > Hi Philip, > > On Mon, Dec 21, 2020 at 05:47:57PM -0800, Philip Chen wrote: > > This patch adds a new property `google,custom-ke

[PATCH 2/3] Input: cros_ec_keyb - Support custom top-row keys

2020-12-21 Thread Philip Chen
n. If a board specifies a custom layout for the top row keys in dt binding, cros_ec_keyb will explicitly sends action key code to applications when any top-row key is pressed, so the applications no longer have to make assumptions. Signed-off-by: Philip Chen --- drivers/input/key

[PATCH 3/3] Input: cros-ec-keyb - Expose function row physical map to userspace

2020-12-21 Thread Philip Chen
only be present when cros-ec-keyb sends action key codes for the top-row keys, otherwise the attribute shall not be visible. Signed-off-by: Philip Chen --- drivers/input/keyboard/cros_ec_keyb.c | 59 +++ 1 file changed, 59 insertions(+) diff --git a/drivers/input/keyboa

[PATCH 1/3] dt-bindings: input: cros-ec-keyb: Add a new property

2020-12-21 Thread Philip Chen
This patch adds a new property `google,custom-keyb-top-row` to the device tree for the custom keyboard top row design. Signed-off-by: Philip Chen --- .../devicetree/bindings/input/google,cros-ec-keyb.yaml | 7 +++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree