Merge tag 'pwm/for-6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 7 Oct 2022 18:32:10 +0000 (11:32 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 7 Oct 2022 18:32:10 +0000 (11:32 -0700)
Pull pwm updates from Thierry Reding:
 "The Rockchip and Mediatek drivers gain support for more chips and the
  LPSS driver undergoes some refactoring and receives some improvements.

  Other than that there are various cleanups of the core"

* tag 'pwm/for-6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm:
  pwm: sysfs: Replace sprintf() with sysfs_emit()
  pwm: core: Replace custom implementation of device_match_fwnode()
  pwm: lpss: Add a comment to the bypass field
  pwm: lpss: Make use of bits.h macros for all masks
  pwm: lpss: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros
  pwm: lpss: Use device_get_match_data() to get device data
  pwm: lpss: Move resource mapping to the glue drivers
  pwm: lpss: Move exported symbols to PWM_LPSS namespace
  pwm: lpss: Deduplicate board info data structures
  dt-bindings: pwm: Add compatible for Mediatek MT8188
  dt-bindings: pwm: rockchip: Add rockchip,rk3128-pwm
  dt-bindings: pwm: rockchip: Add description for rk3588
  pwm: sysfs: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
  pwm: rockchip: Convert to use dev_err_probe()

1  2 
drivers/pwm/core.c

diff --combined drivers/pwm/core.c
index cfe3a03274711ecb6bf330b0d4546e4edb76864f,ebb2c53ac7a74666d58aa84d28dceb6605e93c1a..d333e7422f4a9c9e9619d603934c8f5ba0a4c030
@@@ -678,7 -678,7 +678,7 @@@ static struct pwm_chip *fwnode_to_pwmch
        mutex_lock(&pwm_lock);
  
        list_for_each_entry(chip, &pwm_chips, list)
-               if (chip->dev && dev_fwnode(chip->dev) == fwnode) {
+               if (chip->dev && device_match_fwnode(chip->dev, fwnode)) {
                        mutex_unlock(&pwm_lock);
                        return chip;
                }
@@@ -734,8 -734,8 +734,8 @@@ static struct device_link *pwm_device_l
   * Returns: A pointer to the requested PWM device or an ERR_PTR()-encoded
   * error code on failure.
   */
 -struct pwm_device *of_pwm_get(struct device *dev, struct device_node *np,
 -                            const char *con_id)
 +static struct pwm_device *of_pwm_get(struct device *dev, struct device_node *np,
 +                                   const char *con_id)
  {
        struct pwm_device *pwm = NULL;
        struct of_phandle_args args;
@@@ -797,6 -797,7 +797,6 @@@ put
  
        return pwm;
  }
 -EXPORT_SYMBOL_GPL(of_pwm_get);
  
  /**
   * acpi_pwm_get() - request a PWM via parsing "pwms" property in ACPI
@@@ -1069,6 -1070,36 +1069,6 @@@ struct pwm_device *devm_pwm_get(struct 
  }
  EXPORT_SYMBOL_GPL(devm_pwm_get);
  
 -/**
 - * devm_of_pwm_get() - resource managed of_pwm_get()
 - * @dev: device for PWM consumer
 - * @np: device node to get the PWM from
 - * @con_id: consumer name
 - *
 - * This function performs like of_pwm_get() but the acquired PWM device will
 - * automatically be released on driver detach.
 - *
 - * Returns: A pointer to the requested PWM device or an ERR_PTR()-encoded
 - * error code on failure.
 - */
 -struct pwm_device *devm_of_pwm_get(struct device *dev, struct device_node *np,
 -                                 const char *con_id)
 -{
 -      struct pwm_device *pwm;
 -      int ret;
 -
 -      pwm = of_pwm_get(dev, np, con_id);
 -      if (IS_ERR(pwm))
 -              return pwm;
 -
 -      ret = devm_add_action_or_reset(dev, devm_pwm_release, pwm);
 -      if (ret)
 -              return ERR_PTR(ret);
 -
 -      return pwm;
 -}
 -EXPORT_SYMBOL_GPL(devm_of_pwm_get);
 -
  /**
   * devm_fwnode_pwm_get() - request a resource managed PWM from firmware node
   * @dev: device for PWM consumer