9426adb0 | 09-May-2024 |
Hans de Goede <hdegoede@redhat.com> |
platform/x86: x86-android-tablets: Create LED device for Xiaomi Pad 2 bottom bezel touch buttons
The Xiaomi [Mi]Pad 2 has 3 menu / home / back capacitive touch-buttons on its bottom bezel. These are
platform/x86: x86-android-tablets: Create LED device for Xiaomi Pad 2 bottom bezel touch buttons
The Xiaomi [Mi]Pad 2 has 3 menu / home / back capacitive touch-buttons on its bottom bezel. These are backlit by LEDs attached to a TPS61158 LED controller which is controlled by the "pwm_soc_lpss_2" PWM output.
Create a LED class device for this, using the new input-events trigger as default trigger so that the buttons automatically light up on any input activity.
Note alternatively a "leds_pwm" platform device could be created together with the necessary fwnode_s_ and a fwnode link to the PWM controller. There are 2 downsides to this approach:
1. The code would still need to pwm_get() the PWM controller to get/attach a fwnode for the PWM controller fwnode link and setting up the necessary fwnodes is non-trivial. So this would likely require more code then simply registering the LED class device directly.
2. Currently the leds_pwm driver and its devicetree bindings do not support limiting the maximum dutycycle to less then 100% which is required in this case (the leds_pwm driver can probably be extended to allow this).
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20240509141207.63570-2-hdegoede@redhat.com
show more ...
|
0b57e2e4 | 04-May-2024 |
Kate Hsuan <hpa@redhat.com> |
platform/x86: x86-android-tablets: Xiaomi pad2 RGB LED fwnode updates
Xiaomi pad2 RGB LED fwnode updates:
1. Set "label" instead "function" to change the LED classdev name from "rgb:indicator" t
platform/x86: x86-android-tablets: Xiaomi pad2 RGB LED fwnode updates
Xiaomi pad2 RGB LED fwnode updates:
1. Set "label" instead "function" to change the LED classdev name from "rgb:indicator" to "mipad2:rgb:indicator" to match the usual triplet name format for LED classdevs.
2. Set the trigger to the new "bq27520-0-charging-orange-full-green" powersupply trigger type for multi-color LEDs.
3. Put the fwnode link for red before green in ktd2026_node_group[] so that multi_index becomes "red green blue".
Signed-off-by: Kate Hsuan <hpa@redhat.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Co-developed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20240504164105.114017-8-hdegoede@redhat.com
show more ...
|
c1ca2311 | 08-Apr-2024 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
platform/x86: android-tablets: Use GPIO_LOOKUP() macro
Use GPIO_LOOKUP() macro which provides a compound literal and can be used with dynamic data.
Signed-off-by: Andy Shevchenko <andriy.shevchenko
platform/x86: android-tablets: Use GPIO_LOOKUP() macro
Use GPIO_LOOKUP() macro which provides a compound literal and can be used with dynamic data.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240408153749.119394-1-andriy.shevchenko@linux.intel.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
show more ...
|
3eee73ad | 06-Apr-2024 |
Hans de Goede <hdegoede@redhat.com> |
platform/x86: x86-android-tablets: Add Lenovo Yoga Tablet 2 Pro 1380F/L data
The Lenovo Yoga Tablet 2 Pro 1380F/L is a x86 ACPI tablet which ships with Android x86 as factory OS. Its DSDT contains a
platform/x86: x86-android-tablets: Add Lenovo Yoga Tablet 2 Pro 1380F/L data
The Lenovo Yoga Tablet 2 Pro 1380F/L is a x86 ACPI tablet which ships with Android x86 as factory OS. Its DSDT contains a bunch of I2C devices which are not actually there, causing various resource conflicts. Enumeration of these is skipped through the acpi_quirk_skip_i2c_client_enumeration().
Add support for manually instantiating the I2C + other devices which are actually present on this tablet by adding the necessary device info to the x86-android-tablets module.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20240406125058.13624-2-hdegoede@redhat.com
show more ...
|
3de0f262 | 06-Apr-2024 |
Hans de Goede <hdegoede@redhat.com> |
platform/x86: x86-android-tablets: Unregister devices in reverse order
Not all subsystems support a device getting removed while there are still consumers of the device with a reference to the devic
platform/x86: x86-android-tablets: Unregister devices in reverse order
Not all subsystems support a device getting removed while there are still consumers of the device with a reference to the device.
One example of this is the regulator subsystem. If a regulator gets unregistered while there are still drivers holding a reference a WARN() at drivers/regulator/core.c:5829 triggers, e.g.:
WARNING: CPU: 1 PID: 1587 at drivers/regulator/core.c:5829 regulator_unregister Hardware name: Intel Corp. VALLEYVIEW C0 PLATFORM/BYT-T FFD8, BIOS BLADE_21.X64.0005.R00.1504101516 FFD8_X64_R_2015_04_10_1516 04/10/2015 RIP: 0010:regulator_unregister Call Trace: <TASK> regulator_unregister devres_release_group i2c_device_remove device_release_driver_internal bus_remove_device device_del device_unregister x86_android_tablet_remove
On the Lenovo Yoga Tablet 2 series the bq24190 charger chip also provides a 5V boost converter output for powering USB devices connected to the micro USB port, the bq24190-charger driver exports this as a Vbus regulator.
On the 830 (8") and 1050 ("10") models this regulator is controlled by a platform_device and x86_android_tablet_remove() removes platform_device-s before i2c_clients so the consumer gets removed first.
But on the 1380 (13") model there is a lc824206xa micro-USB switch connected over I2C and the extcon driver for that controls the regulator. The bq24190 i2c-client *must* be registered first, because that creates the regulator with the lc824206xa listed as its consumer. If the regulator has not been registered yet the lc824206xa driver will end up getting a dummy regulator.
Since in this case both the regulator provider and consumer are I2C devices, the only way to ensure that the consumer is unregistered first is to unregister the I2C devices in reverse order of in which they were created.
For consistency and to avoid similar problems in the future change x86_android_tablet_remove() to unregister all device types in reverse order.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20240406125058.13624-1-hdegoede@redhat.com
show more ...
|
8215ca51 | 16-Feb-2024 |
Hans de Goede <hdegoede@redhat.com> |
platform/x86: x86-android-tablets: Fix acer_b1_750_goodix_gpios name
The Acer B1 750 tablet used a Novatek NVT-ts touchscreen, not a Goodix touchscreen.
Rename acer_b1_750_goodix_gpios to acer_b1_7
platform/x86: x86-android-tablets: Fix acer_b1_750_goodix_gpios name
The Acer B1 750 tablet used a Novatek NVT-ts touchscreen, not a Goodix touchscreen.
Rename acer_b1_750_goodix_gpios to acer_b1_750_nvt_ts_gpios to correctly reflect this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20240216201721.239791-5-hdegoede@redhat.com
show more ...
|
812a79b5 | 16-Feb-2024 |
Hans de Goede <hdegoede@redhat.com> |
platform/x86: x86-android-tablets: Fix serdev instantiation no longer working
After commit b286f4e87e32 ("serial: core: Move tty and serdev to be children of serial core port device") x86_instantiat
platform/x86: x86-android-tablets: Fix serdev instantiation no longer working
After commit b286f4e87e32 ("serial: core: Move tty and serdev to be children of serial core port device") x86_instantiate_serdev() no longer works due to the serdev-controller-device moving in the device hierarchy from (e.g.) /sys/devices/pci0000:00/8086228A:00/serial0 to /sys/devices/pci0000:00/8086228A:00/8086228A:00:0/8086228A:00:0.0/serial0
Use the new get_serdev_controller() helper function to fix this.
Fixes: b286f4e87e32 ("serial: core: Move tty and serdev to be children of serial core port device") Cc: Tony Lindgren <tony@atomide.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20240216201721.239791-4-hdegoede@redhat.com
show more ...
|
93ec6f22 | 04-Nov-2023 |
Hans de Goede <hdegoede@redhat.com> |
platform/x86: x86-android-tablets: Fix backlight ctrl for Lenovo Yoga Tab 3 Pro YT3-X90F
Fix the maximum brightness being much too low on the Yoga Tab 3 Pro.
The LP8557 backlight controller can eit
platform/x86: x86-android-tablets: Fix backlight ctrl for Lenovo Yoga Tab 3 Pro YT3-X90F
Fix the maximum brightness being much too low on the Yoga Tab 3 Pro.
The LP8557 backlight controller can either be configured to multiply its PWM input and the I2C register set level (requiring both to be at 100% for 100% output); or to only take the I2C register set level into account.
Multiplying the 2 levels is useful because this will turn off the backlight when the panel goes off and turns off its PWM output.
But on the YT3-X90F the panel's PWM output defaults to a duty-cycle of much less then 100%, severely limiting max brightness. In this case the LP8557 should be configured to only take the I2C register into account and the i915 driver must turn off the backlight separately using a VBT MIPI sequence to turn off the backlight.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20231104205828.63139-4-hdegoede@redhat.com
show more ...
|
115779bf | 04-Nov-2023 |
Hans de Goede <hdegoede@redhat.com> |
platform/x86: x86-android-tablets: Add audio codec info for Lenovo Yoga Tab 3 Pro YT3-X90F
The SPI attached WM5102 codec on the Lenovo Yoga Tab 3 Pro YT3-X90F is not described in the ACPI tables.
A
platform/x86: x86-android-tablets: Add audio codec info for Lenovo Yoga Tab 3 Pro YT3-X90F
The SPI attached WM5102 codec on the Lenovo Yoga Tab 3 Pro YT3-X90F is not described in the ACPI tables.
Add info to instantiate the SPI device for the codec manually.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20231104205828.63139-3-hdegoede@redhat.com
show more ...
|
eee9cd5d | 11-Sep-2023 |
Hans de Goede <hdegoede@redhat.com> |
platform/x86: x86-android-tablets: Add a comment about x86_android_tablet_get_gpiod()
Add a comment explaining why the special x86_android_tablet_get_gpiod() helper is necessary for some of the GPIO
platform/x86: x86-android-tablets: Add a comment about x86_android_tablet_get_gpiod()
Add a comment explaining why the special x86_android_tablet_get_gpiod() helper is necessary for some of the GPIOs used in the x86-android-tablets; and that for normal GPIO lookups this example should not be followed.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20230911210928.264908-1-hdegoede@redhat.com
show more ...
|
9578db79 | 09-Sep-2023 |
Hans de Goede <hdegoede@redhat.com> |
platform/x86: x86-android-tablets: Drop "linux,power-supply-name" from lenovo_yt3_bq25892_0_props[]
The "linux,power-supply-name" property is a left-over from an earlier attempt to allow properties
platform/x86: x86-android-tablets: Drop "linux,power-supply-name" from lenovo_yt3_bq25892_0_props[]
The "linux,power-supply-name" property is a left-over from an earlier attempt to allow properties to specify the power_supply class-device name.
The patch to read this property never made it upstream (and is no longer necessary). Drop the unused property.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20230909141816.58358-9-hdegoede@redhat.com
show more ...
|
61226c1c | 09-Sep-2023 |
Hans de Goede <hdegoede@redhat.com> |
platform/x86: x86-android-tablets: Use platform-device as gpio-keys parent
Use the new x86-android-tablets platform-device as gpio-keys parent to make it clear that this gpio-keys device was instant
platform/x86: x86-android-tablets: Use platform-device as gpio-keys parent
Use the new x86-android-tablets platform-device as gpio-keys parent to make it clear that this gpio-keys device was instantiated by the x86-android-tablets driver.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20230909141816.58358-8-hdegoede@redhat.com
show more ...
|
4014ae23 | 09-Sep-2023 |
Hans de Goede <hdegoede@redhat.com> |
platform/x86: x86-android-tablets: Stop using gpiolib private APIs
Refactor x86_android_tablet_get_gpiod() to no longer use gpiolib private functions like gpiochip_find().
As a bonus this allows sp
platform/x86: x86-android-tablets: Stop using gpiolib private APIs
Refactor x86_android_tablet_get_gpiod() to no longer use gpiolib private functions like gpiochip_find().
As a bonus this allows specifying that the GPIO is active-low, like the /CE (charge enable) pin on the bq25892 charger on the Lenovo Yoga Tablet 3.
Reported-by: Bartosz Golaszewski <brgl@bgdev.pl> Closes: https://lore.kernel.org/platform-driver-x86/20230905185309.131295-12-brgl@bgdev.pl/ Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20230909141816.58358-7-hdegoede@redhat.com
show more ...
|
8b57d33a | 09-Sep-2023 |
Hans de Goede <hdegoede@redhat.com> |
platform/x86: x86-android-tablets: Create a platform_device from module_init()
Create a platform_device from module_init() and change x86_android_tablet_init() / cleanup() into platform_device probe
platform/x86: x86-android-tablets: Create a platform_device from module_init()
Create a platform_device from module_init() and change x86_android_tablet_init() / cleanup() into platform_device probe() and remove() functions.
This is a preparation patch for refactoring x86_android_tablet_get_gpiod() to no longer use gpiolib private functions like gpiochip_find().
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20230909141816.58358-6-hdegoede@redhat.com
show more ...
|
56e1f53b | 09-Sep-2023 |
Hans de Goede <hdegoede@redhat.com> |
platform/x86: x86-android-tablets: Remove invalid_aei_gpiochip support
x86_dev_info.invalid_aei_gpiochip is no longer used by any boards and the x86-android-tablets code should not use the gpiolib p
platform/x86: x86-android-tablets: Remove invalid_aei_gpiochip support
x86_dev_info.invalid_aei_gpiochip is no longer used by any boards and the x86-android-tablets code should not use the gpiolib private acpi_gpiochip_free_interrupts() function.
Reported-by: Bartosz Golaszewski <brgl@bgdev.pl> Closes: https://lore.kernel.org/platform-driver-x86/20230905185309.131295-12-brgl@bgdev.pl/ Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20230909141816.58358-5-hdegoede@redhat.com
show more ...
|
24f7b9a0 | 05-May-2023 |
Hans de Goede <hdegoede@redhat.com> |
platform/x86: x86-android-tablets: Add support for extra buttons on Cyberbook T116
The Cyberbook T116 rugged tablet comes in both Windows and Android versions and even on the Android version the DSD
platform/x86: x86-android-tablets: Add support for extra buttons on Cyberbook T116
The Cyberbook T116 rugged tablet comes in both Windows and Android versions and even on the Android version the DSDT is mostly sane. This tablet has 2 extra general purpose buttons in the row with the power + volume-buttons, labeled P and F.
Use the x86-android-tablets infra to create a gpio-button device for these 2 extra buttons.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20230505205901.42649-2-hdegoede@redhat.com
show more ...
|
6dc6c0c1 | 05-May-2023 |
Hans de Goede <hdegoede@redhat.com> |
platform/x86: x86-android-tablets: Add support for more then 1 gpio_key
Modify the gpio_keys support in x86_android_tablet_init() for tablets which have more then 1 key/button which needs to be hand
platform/x86: x86-android-tablets: Add support for more then 1 gpio_key
Modify the gpio_keys support in x86_android_tablet_init() for tablets which have more then 1 key/button which needs to be handled by the gpio_keys driver.
This requires copying over the struct gpio_keys_button from the x86_gpio_button struct array to a new gpio_keys_button struct array, as an added benefit this allows marking the per model x86_gpio_button arrays __initconst so that they all can be freed after module init().
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20230505205901.42649-1-hdegoede@redhat.com
show more ...
|