#
e2e75e42 |
| 27-Aug-2024 |
Dmitry Torokhov <dmitry.torokhov@gmail.com> |
Input: mt6779-keypad - use devm_clk_get_enabled()
Switch to using devm_clk_get_enable() helper instead of acquiring the clock with devm_clk_get(), enabling it, and defining and installing a custom d
Input: mt6779-keypad - use devm_clk_get_enabled()
Switch to using devm_clk_get_enable() helper instead of acquiring the clock with devm_clk_get(), enabling it, and defining and installing a custom devm action to call clk_disable().
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/r/Zs4UWGKt3hLjNmoP@google.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
show more ...
|
#
387e4975 |
| 27-Aug-2024 |
Liao Chen <liaochen4@huawei.com> |
Input: mt6779-keypad - fix module autoloading
Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table.
Signed-off-by: Liao Chen <liaochen4@huaw
Input: mt6779-keypad - fix module autoloading
Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table.
Signed-off-by: Liao Chen <liaochen4@huawei.com> Link: https://lore.kernel.org/r/20240827123411.431388-1-liaochen4@huawei.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
show more ...
|
#
81a7cba7 |
| 23-Sep-2022 |
Dmitry Torokhov <dmitry.torokhov@gmail.com> |
Input: mt6779-keypad - add missing linux/input.h include
We are going to clean up matrix_keymap.h from unnecessary includes, so the driver needs to include API that it uses directly.
Reviewed-by: A
Input: mt6779-keypad - add missing linux/input.h include
We are going to clean up matrix_keymap.h from unnecessary includes, so the driver needs to include API that it uses directly.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220923194738.927408-3-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
show more ...
|
#
51c88597 |
| 26-Jul-2022 |
Mattijs Korpershoek <mkorpershoek@baylibre.com> |
Input: mt6779-keypad - support double keys matrix
MediaTek keypad has 2 modes of detecting key events: - single key: each (row, column) can detect one key - double key: each (row, column) is a group
Input: mt6779-keypad - support double keys matrix
MediaTek keypad has 2 modes of detecting key events: - single key: each (row, column) can detect one key - double key: each (row, column) is a group of 2 keys
Double key support exists to minimize cost, since it reduces the number of pins required for physical keys.
Double key is configured by setting BIT(0) of the KP_SEL register.
Enable double key matrix support based on the mediatek,keys-per-group device tree property.
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220720-mt8183-keypad-v2-5-6d42c357cb76@baylibre.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
show more ...
|
#
e76be36a |
| 26-Jul-2022 |
Mattijs Korpershoek <mkorpershoek@baylibre.com> |
Input: mt6779-keypad - prepare double keys support with calc_row_col
The MediaTek keypad can operate in two modes: single key or double key. The driver only supports single key mode. In double key m
Input: mt6779-keypad - prepare double keys support with calc_row_col
The MediaTek keypad can operate in two modes: single key or double key. The driver only supports single key mode. In double key mode, the row/column calculation based on the key is different.
Add a calc_row_col function pointer which will be different based on single/double key mode.
No functional change.
Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220720-mt8183-keypad-v2-4-6d42c357cb76@baylibre.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
show more ...
|
#
31789f35 |
| 08-Jul-2022 |
Mattijs Korpershoek <mkorpershoek@baylibre.com> |
Input: mt6779-keypad - implement row/column selection
The MediaTek keypad has a total of 6 input rows and 6 input columns. By default, rows/columns 0-2 are enabled.
This is controlled by the KP_SEL
Input: mt6779-keypad - implement row/column selection
The MediaTek keypad has a total of 6 input rows and 6 input columns. By default, rows/columns 0-2 are enabled.
This is controlled by the KP_SEL register: - bits[9:4] control row selection - bits[15:10] control column selection
Each bit enables the corresponding row/column number (e.g KP_SEL[4] enables ROW0)
Depending on how the keypad is wired, this may result in wrong readings of the keypad state.
Program the KP_SEL register to limit the key detection to n_rows, n_cols we retrieve from the device tree.
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/r/20220707075236.126631-3-mkorpershoek@baylibre.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
show more ...
|
#
d6ed5258 |
| 08-Jul-2022 |
Mattijs Korpershoek <mkorpershoek@baylibre.com> |
Input: mt6779-keypad - match hardware matrix organization
The MediaTek keypad has a set of bits representing keys, from KEY0 to KEY77, arranged in 5 chunks of 15 bits split into 5 32-bit registers.
Input: mt6779-keypad - match hardware matrix organization
The MediaTek keypad has a set of bits representing keys, from KEY0 to KEY77, arranged in 5 chunks of 15 bits split into 5 32-bit registers.
In our implementation, we simply decided to use register number as row and offset in the register as column when encoding our "matrix".
Because of this, we can have a 5x32 matrix which does not match the hardware at all, which is confusing.
Change the row/column calculation to match the hardware.
Fixes: f28af984e771 ("Input: mt6779-keypad - add MediaTek keypad driver") Co-developed-by: Fabien Parent <fparent@baylibre.com> Signed-off-by: Fabien Parent <fparent@baylibre.com> Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/r/20220707075236.126631-2-mkorpershoek@baylibre.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
show more ...
|
#
db6c4ee7 |
| 09-Apr-2022 |
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> |
Input: mt6779-keypad - move iomem pointer to probe function
The mmio base address is used for the only purpose of initializing regmap for this driver, hence it's not necessary to have it in the main
Input: mt6779-keypad - move iomem pointer to probe function
The mmio base address is used for the only purpose of initializing regmap for this driver, hence it's not necessary to have it in the main driver structure, as it is used only in the probe() callback. Move it local to function mt6779_keypad_pdrv_probe().
This commit brings no functional changes.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/r/20220406115654.115093-1-angelogioacchino.delregno@collabora.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
show more ...
|
#
5fb3fb8a |
| 15-Mar-2022 |
Lv Ruyi (CGEL ZTE) <lv.ruyi@zte.com.cn> |
Input: mt6779-keypad - fix signedness bug
The irq variable is defined as unsigned int. If the platform_get_irq() returns a negative value, data type cast may result in error.
Reported-by: Zeal Robo
Input: mt6779-keypad - fix signedness bug
The irq variable is defined as unsigned int. If the platform_get_irq() returns a negative value, data type cast may result in error.
Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Lv Ruyi (CGEL ZTE) <lv.ruyi@zte.com.cn> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/r/20220308025054.2077162-1-lv.ruyi@zte.com.cn Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
show more ...
|
#
f28af984 |
| 05-Mar-2022 |
fengping.yu <fengping.yu@mediatek.com> |
Input: mt6779-keypad - add MediaTek keypad driver
This patch adds matrix keypad support for Mediatek SoCs.
Signed-off-by: fengping.yu <fengping.yu@mediatek.com> Reviewed-by: Marco Felsch <m.felsch@
Input: mt6779-keypad - add MediaTek keypad driver
This patch adds matrix keypad support for Mediatek SoCs.
Signed-off-by: fengping.yu <fengping.yu@mediatek.com> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/r/20220303154302.252041-3-mkorpershoek@baylibre.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
show more ...
|