[PATCH 00/18] unify register access and macros

Chunfeng Yun chunfeng.yun at mediatek.com
Tue Sep 20 02:00:20 PDT 2022


No need to define new macros to generate bits, mask and bitfield, use
common ones instead, e.g. BIT, GENMASK and FIELD_PREP etc.
Due to common register access helpers are defined for MediaTek's phy
drivers, the similar helpers defined by ufs, hdmi and mipi phy drivers
can be removed.

Chunfeng Yun (18):
  phy: mediatek: add a new helper to update bitfield
  phy: mediatek: tphy: remove macros to prepare bitfield value
  phy: mediatek: xsphy: remove macros used to prepare bitfield value
  phy: mediatek: ufs: use common register access helpers
  phy: mediatek: pcie: use new helper to update register bits
  phy: mediatek: hdmi: mt2701: use GENMASK and BIT to generate mask and
    bits
  phy: mediatek: hdmi: mt2701: use FIELD_PREP to prepare bits field
  phy: mediatek: hdmi: mt2701: use common helper to access registers
  phy: mediatek: hdmi: mt8173: use GENMASK to generate bits mask
  phy: mediatek: hdmi: mt8173: use FIELD_PREP to prepare bits field
  phy: mediatek: hdmi: mt8173: use common helper to access registers
  phy: mediatek: hdmi: remove register access helpers
  phy: mediatek: mipi: mt8173: use GENMASK to generate bits mask
  phy: mediatek: mipi: mt8173: use FIELD_PREP to prepare bits field
  phy: mediatek: mipi: mt8173: use common helper to access registers
  phy: mediatek: mipi: mt8183: use GENMASK to generate bits mask
  phy: mediatek: mipi: mt8183: use common helper to access registers
  phy: mediatek: mipi: remove register access helpers

 drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c    | 238 ++++++++---------
 drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c    | 246 ++++++++----------
 drivers/phy/mediatek/phy-mtk-hdmi.c           |  33 ---
 drivers/phy/mediatek/phy-mtk-hdmi.h           |   7 -
 drivers/phy/mediatek/phy-mtk-io.h             |   7 +
 .../phy/mediatek/phy-mtk-mipi-dsi-mt8173.c    | 164 ++++++------
 .../phy/mediatek/phy-mtk-mipi-dsi-mt8183.c    |  74 +++---
 drivers/phy/mediatek/phy-mtk-mipi-dsi.c       |  24 --
 drivers/phy/mediatek/phy-mtk-mipi-dsi.h       |   5 -
 drivers/phy/mediatek/phy-mtk-pcie.c           |  17 +-
 drivers/phy/mediatek/phy-mtk-tphy.c           | 193 +++++---------
 drivers/phy/mediatek/phy-mtk-ufs.c            |  78 ++----
 drivers/phy/mediatek/phy-mtk-xsphy.c          |  46 ++--
 13 files changed, 465 insertions(+), 667 deletions(-)

-- 
2.18.0




More information about the linux-phy mailing list