Commit ffec878f authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'pwrseq-updates-for-v6.17-rc1' of...

Merge tag 'pwrseq-updates-for-v6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull power sequencing updates from Bartosz Golaszewski:
 "One new driver and a small set of improvements as well as a fix to
  power sequence unit naming.

  New driver:
   - add a power sequencing driver for the T-HEAD TH1520 GPU

  Power sequencing core improvements:
   - allow to compile the pwrseq drivers with COMPILE_TEST=y in order to
     improve the build-test coverage
   - add named defines for the possible return values of the .match()
     callback and use it in the existing drivers instead of magic values

  Fix:
   - Fix the name of the bluetooth-enable unit for WCN6855"

* tag 'pwrseq-updates-for-v6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
  power: sequencing: qcom-wcn: fix bluetooth-wifi copypasta for WCN6855
  power: sequencing: thead-gpu: use new defines for match() return values
  power: sequencing: qcom-wcn: use new defines for match() return values
  power: sequencing: add defines for return values of the match() callback
  power: sequencing: extend build coverage with COMPILE_TEST=y
  power: sequencing: thead-gpu: add missing header
  power: sequencing: Add T-HEAD TH1520 GPU power sequencer driver
parents fcb117e0 07d59dec
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -21434,6 +21434,7 @@ F: drivers/mailbox/mailbox-th1520.c
F:	drivers/net/ethernet/stmicro/stmmac/dwmac-thead.c
F:	drivers/pinctrl/pinctrl-th1520.c
F:	drivers/pmdomain/thead/
F:	drivers/power/sequencing/pwrseq-thead-gpu.c
F:	drivers/reset/reset-th1520.c
F:	include/dt-bindings/clock/thead,th1520-clk-ap.h
F:	include/dt-bindings/power/thead,th1520-power.h
+9 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ if POWER_SEQUENCING
config POWER_SEQUENCING_QCOM_WCN
	tristate "Qualcomm WCN family PMU driver"
	default m if ARCH_QCOM
	depends on OF
	depends on OF || COMPILE_TEST
	help
	  Say Y here to enable the power sequencing driver for Qualcomm
	  WCN Bluetooth/WLAN chipsets.
@@ -27,4 +27,12 @@ config POWER_SEQUENCING_QCOM_WCN
	  this driver is needed for correct power control or else we'd risk not
	  respecting the required delays between enabling Bluetooth and WLAN.

config POWER_SEQUENCING_TH1520_GPU
	tristate "T-HEAD TH1520 GPU power sequencing driver"
	depends on (ARCH_THEAD && AUXILIARY_BUS) || COMPILE_TEST
	help
	  Say Y here to enable the power sequencing driver for the TH1520 SoC
	  GPU. This driver handles the complex clock and reset sequence
	  required to power on the Imagination BXM GPU on this platform.

endif
+1 −0
Original line number Diff line number Diff line
@@ -4,3 +4,4 @@ obj-$(CONFIG_POWER_SEQUENCING) += pwrseq-core.o
pwrseq-core-y				:= core.o

obj-$(CONFIG_POWER_SEQUENCING_QCOM_WCN)	+= pwrseq-qcom-wcn.o
obj-$(CONFIG_POWER_SEQUENCING_TH1520_GPU) += pwrseq-thead-gpu.o
+3 −3
Original line number Diff line number Diff line
@@ -628,7 +628,7 @@ static int pwrseq_match_device(struct device *pwrseq_dev, void *data)
		return 0;

	ret = pwrseq->match(pwrseq, match_data->dev);
	if (ret <= 0)
	if (ret == PWRSEQ_NO_MATCH || ret < 0)
		return ret;

	/* We got the matching device, let's find the right target. */
@@ -651,7 +651,7 @@ static int pwrseq_match_device(struct device *pwrseq_dev, void *data)

	match_data->desc->pwrseq = pwrseq_device_get(pwrseq);

	return 1;
	return PWRSEQ_MATCH_OK;
}

/**
@@ -684,7 +684,7 @@ struct pwrseq_desc *pwrseq_get(struct device *dev, const char *target)
			       pwrseq_match_device);
	if (ret < 0)
		return ERR_PTR(ret);
	if (ret == 0)
	if (ret == PWRSEQ_NO_MATCH)
		/* No device matched. */
		return ERR_PTR(-EPROBE_DEFER);

+5 −5
Original line number Diff line number Diff line
@@ -155,7 +155,7 @@ static const struct pwrseq_unit_data pwrseq_qcom_wcn_bt_unit_data = {
};

static const struct pwrseq_unit_data pwrseq_qcom_wcn6855_bt_unit_data = {
	.name = "wlan-enable",
	.name = "bluetooth-enable",
	.deps = pwrseq_qcom_wcn6855_unit_deps,
	.enable = pwrseq_qcom_wcn_bt_enable,
	.disable = pwrseq_qcom_wcn_bt_disable,
@@ -341,12 +341,12 @@ static int pwrseq_qcom_wcn_match(struct pwrseq_device *pwrseq,
	 * device.
	 */
	if (!of_property_present(dev_node, "vddaon-supply"))
		return 0;
		return PWRSEQ_NO_MATCH;

	struct device_node *reg_node __free(device_node) =
			of_parse_phandle(dev_node, "vddaon-supply", 0);
	if (!reg_node)
		return 0;
		return PWRSEQ_NO_MATCH;

	/*
	 * `reg_node` is the PMU AON regulator, its parent is the `regulators`
@@ -355,9 +355,9 @@ static int pwrseq_qcom_wcn_match(struct pwrseq_device *pwrseq,
	 */
	if (!reg_node->parent || !reg_node->parent->parent ||
	    reg_node->parent->parent != ctx->of_node)
		return 0;
		return PWRSEQ_NO_MATCH;

	return 1;
	return PWRSEQ_MATCH_OK;
}

static int pwrseq_qcom_wcn_probe(struct platform_device *pdev)
Loading