Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5da0024b authored by Subbaraman Narayanamurthy's avatar Subbaraman Narayanamurthy Committed by David Collins
Browse files

regulator: fan53555: add support for Halo HL7509 buck converter



Halo HL7509 is a digitally programmable buck converter that
outputs a voltage from 600 to 1230 mV from an input voltage of
2.5 to 5.5 V. Since the register mappings are compatible with
FAN53555, add a new vendor ID to support it.

CRs-Fixed: 968575
Change-Id: I0083a7ada311d624731e43755cfd371b2364fb39
Signed-off-by: default avatarSubbaraman Narayanamurthy <subbaram@codeaurora.org>
parent 349cf069
Loading
Loading
Loading
Loading
+10 −1
Original line number Original line Diff line number Diff line
Binding for Fairchild FAN53555 regulators
Binding for Fairchild FAN53555 regulators


Required properties:
Required properties:
  - compatible: one of "fcs,fan53555", "silergy,syr827", "silergy,syr828"
  - compatible: one of "fcs,fan53555", "silergy,syr827", "silergy,syr828" or
    "halo,hl7509"
  - reg: I2C address
  - reg: I2C address


Optional properties:
Optional properties:
@@ -21,3 +22,11 @@ Example:
		vin-supply = <&parent_reg>;
		vin-supply = <&parent_reg>;
		fcs,suspend-voltage-selector = <1>;
		fcs,suspend-voltage-selector = <1>;
	};
	};

	regulator@60 {
		compatible = "halo,hl7509";
		regulator-name = "hl7509";
		regulator-min-microvolt = <600000>;
		regulator-max-microvolt = <1230000>;
		fcs,suspend-voltage-selector = <1>;
	};
+1 −0
Original line number Original line Diff line number Diff line
@@ -116,6 +116,7 @@ google Google, Inc.
grinn	Grinn
grinn	Grinn
gumstix	Gumstix, Inc.
gumstix	Gumstix, Inc.
gw	Gateworks Corporation
gw	Gateworks Corporation
halo	Halo Microelectronics Co., Ltd.
hannstar	HannStar Display Corporation
hannstar	HannStar Display Corporation
haoyu	Haoyu Microelectronic Co. Ltd.
haoyu	Haoyu Microelectronic Co. Ltd.
hardkernel	Hardkernel Co., Ltd
hardkernel	Hardkernel Co., Ltd
+10 −0
Original line number Original line Diff line number Diff line
@@ -55,6 +55,7 @@
enum fan53555_vendor {
enum fan53555_vendor {
	FAN53555_VENDOR_FAIRCHILD = 0,
	FAN53555_VENDOR_FAIRCHILD = 0,
	FAN53555_VENDOR_SILERGY,
	FAN53555_VENDOR_SILERGY,
	HALO_HL7509,
};
};


/* IC Type */
/* IC Type */
@@ -309,6 +310,9 @@ static int fan53555_device_setup(struct fan53555_device_info *di,
	case FAN53555_VENDOR_SILERGY:
	case FAN53555_VENDOR_SILERGY:
		ret = fan53555_voltages_setup_silergy(di);
		ret = fan53555_voltages_setup_silergy(di);
		break;
		break;
	case HALO_HL7509:
		ret = fan53555_voltages_setup_fairchild(di);
		break;
	default:
	default:
		dev_err(di->dev, "vendor %d not supported!\n", di->vendor);
		dev_err(di->dev, "vendor %d not supported!\n", di->vendor);
		return -EINVAL;
		return -EINVAL;
@@ -377,6 +381,9 @@ static const struct of_device_id fan53555_dt_ids[] = {
	}, {
	}, {
		.compatible = "silergy,syr828",
		.compatible = "silergy,syr828",
		.data = (void *)FAN53555_VENDOR_SILERGY,
		.data = (void *)FAN53555_VENDOR_SILERGY,
	}, {
		.compatible = "halo,hl7509",
		.data = (void *)HALO_HL7509,
	},
	},
	{ }
	{ }
};
};
@@ -480,6 +487,9 @@ static const struct i2c_device_id fan53555_id[] = {
	}, {
	}, {
		.name = "syr82x",
		.name = "syr82x",
		.driver_data = FAN53555_VENDOR_SILERGY
		.driver_data = FAN53555_VENDOR_SILERGY
	}, {
		.name = "hl7509",
		.driver_data = HALO_HL7509
	},
	},
	{ },
	{ },
};
};