1
0
Files
Greg Kroah-Hartman 06a33ede12 Merge 4.9.208 into android-4.9-q
Changes in 4.9.208
	btrfs: skip log replay on orphaned roots
	btrfs: do not leak reloc root if we fail to read the fs root
	btrfs: handle ENOENT in btrfs_uuid_tree_iterate
	ALSA: pcm: Avoid possible info leaks from PCM stream buffers
	ALSA: hda/ca0132 - Keep power on during processing DSP response
	ALSA: hda/ca0132 - Avoid endless loop
	drm: mst: Fix query_payload ack reply struct
	drm/bridge: analogix-anx78xx: silence -EPROBE_DEFER warnings
	iio: light: bh1750: Resolve compiler warning and make code more readable
	spi: Add call to spi_slave_abort() function when spidev driver is released
	staging: rtl8192u: fix multiple memory leaks on error path
	staging: rtl8188eu: fix possible null dereference
	rtlwifi: prevent memory leak in rtl_usb_probe
	libertas: fix a potential NULL pointer dereference
	IB/iser: bound protection_sg size by data_sg size
	media: am437x-vpfe: Setting STD to current value is not an error
	media: i2c: ov2659: fix s_stream return value
	media: i2c: ov2659: Fix missing 720p register config
	media: ov6650: Fix stored frame format not in sync with hardware
	tools/power/cpupower: Fix initializer override in hsw_ext_cstates
	usb: renesas_usbhs: add suspend event support in gadget mode
	hwrng: omap3-rom - Call clk_disable_unprepare() on exit only if not idled
	regulator: max8907: Fix the usage of uninitialized variable in max8907_regulator_probe()
	media: flexcop-usb: fix NULL-ptr deref in flexcop_usb_transfer_init()
	media: cec-funcs.h: add status_req checks
	samples: pktgen: fix proc_cmd command result check logic
	mwifiex: pcie: Fix memory leak in mwifiex_pcie_init_evt_ring
	media: ti-vpe: vpe: fix a v4l2-compliance warning about invalid pixel format
	media: ti-vpe: vpe: fix a v4l2-compliance failure about frame sequence number
	media: ti-vpe: vpe: Make sure YUYV is set as default format
	extcon: sm5502: Reset registers during initialization
	x86/mm: Use the correct function type for native_set_fixmap()
	perf test: Report failure for mmap events
	perf report: Add warning when libunwind not compiled in
	usb: usbfs: Suppress problematic bind and unbind uevents.
	iio: adc: max1027: Reset the device at probe time
	Bluetooth: hci_core: fix init for HCI_USER_CHANNEL
	x86/mce: Lower throttling MCE messages' priority to warning
	drm/gma500: fix memory disclosures due to uninitialized bytes
	rtl8xxxu: fix RTL8723BU connection failure issue after warm reboot
	x86/ioapic: Prevent inconsistent state when moving an interrupt
	arm64: psci: Reduce the waiting time for cpu_psci_cpu_kill()
	libata: Ensure ata_port probe has completed before detach
	pinctrl: sh-pfc: sh7734: Fix duplicate TCLK1_B
	Bluetooth: Fix advertising duplicated flags
	bnx2x: Fix PF-VF communication over multi-cos queues.
	spi: img-spfi: fix potential double release
	ALSA: timer: Limit max amount of slave instances
	rtlwifi: fix memory leak in rtl92c_set_fw_rsvdpagepkt()
	perf probe: Fix to find range-only function instance
	perf probe: Fix to list probe event with correct line number
	perf probe: Walk function lines in lexical blocks
	perf probe: Fix to probe an inline function which has no entry pc
	perf probe: Fix to show ranges of variables in functions without entry_pc
	perf probe: Fix to show inlined function callsite without entry_pc
	perf probe: Fix to probe a function which has no entry pc
	perf probe: Skip overlapped location on searching variables
	perf probe: Return a better scope DIE if there is no best scope
	perf probe: Fix to show calling lines of inlined functions
	perf probe: Skip end-of-sequence and non statement lines
	perf probe: Filter out instances except for inlined subroutine and subprogram
	ath10k: fix get invalid tx rate for Mesh metric
	media: pvrusb2: Fix oops on tear-down when radio support is not present
	media: si470x-i2c: add missed operations in remove
	EDAC/ghes: Fix grain calculation
	spi: pxa2xx: Add missed security checks
	ASoC: rt5677: Mark reg RT5677_PWR_ANLG2 as volatile
	s390/disassembler: don't hide instruction addresses
	parport: load lowlevel driver if ports not found
	cpufreq: Register drivers only after CPU devices have been registered
	x86/crash: Add a forward declaration of struct kimage
	iwlwifi: mvm: fix unaligned read of rx_pkt_status
	spi: tegra20-slink: add missed clk_unprepare
	mmc: tmio: Add MMC_CAP_ERASE to allow erase/discard/trim requests
	btrfs: don't prematurely free work in end_workqueue_fn()
	btrfs: don't prematurely free work in run_ordered_work()
	spi: st-ssc4: add missed pm_runtime_disable
	x86/insn: Add some Intel instructions to the opcode map
	iwlwifi: check kasprintf() return value
	fbtft: Make sure string is NULL terminated
	crypto: sun4i-ss - Fix 64-bit size_t warnings on sun4i-ss-hash.c
	crypto: vmx - Avoid weird build failures
	libtraceevent: Fix memory leakage in copy_filter_type
	net: phy: initialise phydev speed and duplex sanely
	btrfs: don't prematurely free work in reada_start_machine_worker()
	Revert "mmc: sdhci: Fix incorrect switch to HS mode"
	usb: xhci: Fix build warning seen with CONFIG_PM=n
	btrfs: don't double lock the subvol_sem for rename exchange
	btrfs: do not call synchronize_srcu() in inode_tree_del
	btrfs: return error pointer from alloc_test_extent_buffer
	btrfs: abort transaction after failed inode updates in create_subvol
	Btrfs: fix removal logic of the tree mod log that leads to use-after-free issues
	af_packet: set defaule value for tmo
	fjes: fix missed check in fjes_acpi_add
	mod_devicetable: fix PHY module format
	net: hisilicon: Fix a BUG trigered by wrong bytes_compl
	net: nfc: nci: fix a possible sleep-in-atomic-context bug in nci_uart_tty_receive()
	net: qlogic: Fix error paths in ql_alloc_large_buffers()
	net: usb: lan78xx: Fix suspend/resume PHY register access error
	sctp: fully initialize v4 addr in some functions
	net: dst: Force 4-byte alignment of dst_metrics
	usbip: Fix error path of vhci_recv_ret_submit()
	USB: EHCI: Do not return -EPIPE when hub is disconnected
	platform/x86: hp-wmi: Make buffer for HPWMI_FEATURE2_QUERY 128 bytes
	staging: comedi: gsc_hpdi: check dma_alloc_coherent() return value
	ext4: fix ext4_empty_dir() for directories with holes
	ext4: check for directory entries too close to block end
	powerpc/irq: fix stack overflow verification
	mmc: sdhci-of-esdhc: fix P2020 errata handling
	perf probe: Fix to show function entry line as probe-able
	scsi: mpt3sas: Fix clear pending bit in ioctl status
	scsi: lpfc: Fix locking on mailbox command completion
	Input: atmel_mxt_ts - disable IRQ across suspend
	iommu/tegra-smmu: Fix page tables in > 4 GiB memory
	scsi: target: compare full CHAP_A Algorithm strings
	scsi: lpfc: Fix SLI3 hba in loop mode not discovering devices
	scsi: csiostor: Don't enable IRQs too early
	powerpc/pseries: Mark accumulate_stolen_time() as notrace
	powerpc/pseries: Don't fail hash page table insert for bolted mapping
	dma-debug: add a schedule point in debug_dma_dump_mappings()
	clocksource/drivers/asm9260: Add a check for of_clk_get
	powerpc/security/book3s64: Report L1TF status in sysfs
	powerpc/book3s64/hash: Add cond_resched to avoid soft lockup warning
	jbd2: Fix statistics for the number of logged blocks
	scsi: tracing: Fix handling of TRANSFER LENGTH == 0 for READ(6) and WRITE(6)
	scsi: lpfc: Fix duplicate unreg_rpi error in port offline flow
	clk: qcom: Allow constant ratio freq tables for rcg
	irqchip/irq-bcm7038-l1: Enable parent IRQ if necessary
	irqchip: ingenic: Error out if IRQ domain creation failed
	fs/quota: handle overflows of sysctl fs.quota.* and report as unsigned long
	scsi: lpfc: fix: Coverity: lpfc_cmpl_els_rsp(): Null pointer dereferences
	scsi: ufs: fix potential bug which ends in system hang
	powerpc/pseries/cmm: Implement release() function for sysfs device
	powerpc/security: Fix wrong message when RFI Flush is disable
	scsi: atari_scsi: sun3_scsi: Set sg_tablesize to 1 instead of SG_NONE
	clk: pxa: fix one of the pxa RTC clocks
	bcache: at least try to shrink 1 node in bch_mca_scan()
	HID: Improve Windows Precision Touchpad detection.
	ext4: work around deleting a file with i_nlink == 0 safely
	scsi: pm80xx: Fix for SATA device discovery
	scsi: scsi_debug: num_tgts must be >= 0
	scsi: target: iscsi: Wait for all commands to finish before freeing a session
	gpio: mpc8xxx: Don't overwrite default irq_set_type callback
	scripts/kallsyms: fix definitely-lost memory leak
	cdrom: respect device capabilities during opening action
	perf regs: Make perf_reg_name() return "unknown" instead of NULL
	libfdt: define INT32_MAX and UINT32_MAX in libfdt_env.h
	s390/cpum_sf: Check for SDBT and SDB consistency
	ocfs2: fix passing zero to 'PTR_ERR' warning
	kernel: sysctl: make drop_caches write-only
	x86/mce: Fix possibly incorrect severity calculation on AMD
	net, sysctl: Fix compiler warning when only cBPF is present
	ALSA: hda - Downgrade error message for single-cmd fallback
	perf strbuf: Remove redundant va_end() in strbuf_addv()
	Make filldir[64]() verify the directory entry filename is valid
	filldir[64]: remove WARN_ON_ONCE() for bad directory entries
	netfilter: ebtables: compat: reject all padding in matches/watchers
	6pack,mkiss: fix possible deadlock
	netfilter: bridge: make sure to pull arp header in br_nf_forward_arp()
	net: icmp: fix data-race in cmp_global_allow()
	hrtimer: Annotate lockless access to timer->state
	tty/serial: atmel: fix out of range clock divider handling
	pinctrl: baytrail: Really serialize all register accesses
	mmc: sdhci: Update the tuning failed messages to pr_debug level
	net: ena: fix napi handler misbehavior when the napi budget is zero
	vhost/vsock: accept only packets with the right dst_cid
	tcp/dccp: fix possible race __inet_lookup_established()
	tcp: do not send empty skb from tcp_write_xmit()
	gtp: fix wrong condition in gtp_genl_dump_pdp()
	gtp: avoid zero size hashtable
	Linux 4.9.208

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2020-01-05 23:14:44 +03:00

400 lines
11 KiB
C

/*
* max8907-regulator.c -- support regulators in max8907
*
* Copyright (C) 2010 Gyungoh Yoo <jack.yoo@maxim-ic.com>
* Copyright (C) 2010-2012, NVIDIA CORPORATION. All rights reserved.
*
* Portions based on drivers/regulator/tps65910-regulator.c,
* Copyright 2010 Texas Instruments Inc.
* Author: Graeme Gregory <gg@slimlogic.co.uk>
* Author: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/err.h>
#include <linux/init.h>
#include <linux/mfd/core.h>
#include <linux/mfd/max8907.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/of_regulator.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#define MAX8907_II2RR_VERSION_MASK 0xF0
#define MAX8907_II2RR_VERSION_REV_A 0x00
#define MAX8907_II2RR_VERSION_REV_B 0x10
#define MAX8907_II2RR_VERSION_REV_C 0x30
struct max8907_regulator {
struct regulator_desc desc[MAX8907_NUM_REGULATORS];
};
#define REG_MBATT() \
[MAX8907_MBATT] = { \
.name = "MBATT", \
.supply_name = "mbatt", \
.id = MAX8907_MBATT, \
.ops = &max8907_mbatt_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
}
#define REG_LDO(ids, supply, base, min, max, step) \
[MAX8907_##ids] = { \
.name = #ids, \
.supply_name = supply, \
.id = MAX8907_##ids, \
.n_voltages = ((max) - (min)) / (step) + 1, \
.ops = &max8907_ldo_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
.min_uV = (min), \
.uV_step = (step), \
.vsel_reg = (base) + MAX8907_VOUT, \
.vsel_mask = 0x3f, \
.enable_reg = (base) + MAX8907_CTL, \
.enable_mask = MAX8907_MASK_LDO_EN, \
}
#define REG_FIXED(ids, supply, voltage) \
[MAX8907_##ids] = { \
.name = #ids, \
.supply_name = supply, \
.id = MAX8907_##ids, \
.n_voltages = 1, \
.ops = &max8907_fixed_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
.min_uV = (voltage), \
}
#define REG_OUT5V(ids, supply, base, voltage) \
[MAX8907_##ids] = { \
.name = #ids, \
.supply_name = supply, \
.id = MAX8907_##ids, \
.n_voltages = 1, \
.ops = &max8907_out5v_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
.min_uV = (voltage), \
.enable_reg = (base), \
.enable_mask = MAX8907_MASK_OUT5V_EN, \
}
#define REG_BBAT(ids, supply, base, min, max, step) \
[MAX8907_##ids] = { \
.name = #ids, \
.supply_name = supply, \
.id = MAX8907_##ids, \
.n_voltages = ((max) - (min)) / (step) + 1, \
.ops = &max8907_bbat_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
.min_uV = (min), \
.uV_step = (step), \
.vsel_reg = (base), \
.vsel_mask = MAX8907_MASK_VBBATTCV, \
}
#define LDO_750_50(id, supply, base) REG_LDO(id, supply, (base), \
750000, 3900000, 50000)
#define LDO_650_25(id, supply, base) REG_LDO(id, supply, (base), \
650000, 2225000, 25000)
static struct regulator_ops max8907_mbatt_ops = {
};
static struct regulator_ops max8907_ldo_ops = {
.list_voltage = regulator_list_voltage_linear,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
.enable = regulator_enable_regmap,
.disable = regulator_disable_regmap,
.is_enabled = regulator_is_enabled_regmap,
};
static struct regulator_ops max8907_ldo_hwctl_ops = {
.list_voltage = regulator_list_voltage_linear,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
};
static struct regulator_ops max8907_fixed_ops = {
.list_voltage = regulator_list_voltage_linear,
};
static struct regulator_ops max8907_out5v_ops = {
.list_voltage = regulator_list_voltage_linear,
.enable = regulator_enable_regmap,
.disable = regulator_disable_regmap,
.is_enabled = regulator_is_enabled_regmap,
};
static struct regulator_ops max8907_out5v_hwctl_ops = {
.list_voltage = regulator_list_voltage_linear,
};
static struct regulator_ops max8907_bbat_ops = {
.list_voltage = regulator_list_voltage_linear,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
};
static struct regulator_desc max8907_regulators[] = {
REG_MBATT(),
REG_LDO(SD1, "in-v1", MAX8907_REG_SDCTL1, 650000, 2225000, 25000),
REG_LDO(SD2, "in-v2", MAX8907_REG_SDCTL2, 637500, 1425000, 12500),
REG_LDO(SD3, "in-v3", MAX8907_REG_SDCTL3, 750000, 3900000, 50000),
LDO_750_50(LDO1, "in1", MAX8907_REG_LDOCTL1),
LDO_650_25(LDO2, "in2", MAX8907_REG_LDOCTL2),
LDO_650_25(LDO3, "in3", MAX8907_REG_LDOCTL3),
LDO_750_50(LDO4, "in4", MAX8907_REG_LDOCTL4),
LDO_750_50(LDO5, "in5", MAX8907_REG_LDOCTL5),
LDO_750_50(LDO6, "in6", MAX8907_REG_LDOCTL6),
LDO_750_50(LDO7, "in7", MAX8907_REG_LDOCTL7),
LDO_750_50(LDO8, "in8", MAX8907_REG_LDOCTL8),
LDO_750_50(LDO9, "in9", MAX8907_REG_LDOCTL9),
LDO_750_50(LDO10, "in10", MAX8907_REG_LDOCTL10),
LDO_750_50(LDO11, "in11", MAX8907_REG_LDOCTL11),
LDO_750_50(LDO12, "in12", MAX8907_REG_LDOCTL12),
LDO_750_50(LDO13, "in13", MAX8907_REG_LDOCTL13),
LDO_750_50(LDO14, "in14", MAX8907_REG_LDOCTL14),
LDO_750_50(LDO15, "in15", MAX8907_REG_LDOCTL15),
LDO_750_50(LDO16, "in16", MAX8907_REG_LDOCTL16),
LDO_650_25(LDO17, "in17", MAX8907_REG_LDOCTL17),
LDO_650_25(LDO18, "in18", MAX8907_REG_LDOCTL18),
LDO_750_50(LDO19, "in19", MAX8907_REG_LDOCTL19),
LDO_750_50(LDO20, "in20", MAX8907_REG_LDOCTL20),
REG_OUT5V(OUT5V, "mbatt", MAX8907_REG_OUT5VEN, 5000000),
REG_OUT5V(OUT33V, "mbatt", MAX8907_REG_OUT33VEN, 3300000),
REG_BBAT(BBAT, "MBATT", MAX8907_REG_BBAT_CNFG,
2400000, 3000000, 200000),
REG_FIXED(SDBY, "MBATT", 1200000),
REG_FIXED(VRTC, "MBATT", 3300000),
};
#ifdef CONFIG_OF
#define MATCH(_name, _id) \
[MAX8907_##_id] = { \
.name = #_name, \
.driver_data = (void *)&max8907_regulators[MAX8907_##_id], \
}
static struct of_regulator_match max8907_matches[] = {
MATCH(mbatt, MBATT),
MATCH(sd1, SD1),
MATCH(sd2, SD2),
MATCH(sd3, SD3),
MATCH(ldo1, LDO1),
MATCH(ldo2, LDO2),
MATCH(ldo3, LDO3),
MATCH(ldo4, LDO4),
MATCH(ldo5, LDO5),
MATCH(ldo6, LDO6),
MATCH(ldo7, LDO7),
MATCH(ldo8, LDO8),
MATCH(ldo9, LDO9),
MATCH(ldo10, LDO10),
MATCH(ldo11, LDO11),
MATCH(ldo12, LDO12),
MATCH(ldo13, LDO13),
MATCH(ldo14, LDO14),
MATCH(ldo15, LDO15),
MATCH(ldo16, LDO16),
MATCH(ldo17, LDO17),
MATCH(ldo18, LDO18),
MATCH(ldo19, LDO19),
MATCH(ldo20, LDO20),
MATCH(out5v, OUT5V),
MATCH(out33v, OUT33V),
MATCH(bbat, BBAT),
MATCH(sdby, SDBY),
MATCH(vrtc, VRTC),
};
static int max8907_regulator_parse_dt(struct platform_device *pdev)
{
struct device_node *np, *regulators;
int ret;
np = pdev->dev.parent->of_node;
if (!np)
return 0;
regulators = of_get_child_by_name(np, "regulators");
if (!regulators) {
dev_err(&pdev->dev, "regulators node not found\n");
return -EINVAL;
}
ret = of_regulator_match(&pdev->dev, regulators, max8907_matches,
ARRAY_SIZE(max8907_matches));
of_node_put(regulators);
if (ret < 0) {
dev_err(&pdev->dev, "Error parsing regulator init data: %d\n",
ret);
return ret;
}
return 0;
}
static inline struct regulator_init_data *match_init_data(int index)
{
return max8907_matches[index].init_data;
}
static inline struct device_node *match_of_node(int index)
{
return max8907_matches[index].of_node;
}
#else
static int max8907_regulator_parse_dt(struct platform_device *pdev)
{
return 0;
}
static inline struct regulator_init_data *match_init_data(int index)
{
return NULL;
}
static inline struct device_node *match_of_node(int index)
{
return NULL;
}
#endif
static int max8907_regulator_probe(struct platform_device *pdev)
{
struct max8907 *max8907 = dev_get_drvdata(pdev->dev.parent);
struct max8907_platform_data *pdata = dev_get_platdata(max8907->dev);
int ret;
struct max8907_regulator *pmic;
unsigned int val;
int i;
struct regulator_config config = {};
struct regulator_init_data *idata;
const char *mbatt_rail_name = NULL;
ret = max8907_regulator_parse_dt(pdev);
if (ret)
return ret;
pmic = devm_kzalloc(&pdev->dev, sizeof(*pmic), GFP_KERNEL);
if (!pmic)
return -ENOMEM;
platform_set_drvdata(pdev, pmic);
memcpy(pmic->desc, max8907_regulators, sizeof(pmic->desc));
/* Backwards compatibility with MAX8907B; SD1 uses different voltages */
ret = regmap_read(max8907->regmap_gen, MAX8907_REG_II2RR, &val);
if (ret)
return ret;
if ((val & MAX8907_II2RR_VERSION_MASK) ==
MAX8907_II2RR_VERSION_REV_B) {
pmic->desc[MAX8907_SD1].min_uV = 637500;
pmic->desc[MAX8907_SD1].uV_step = 12500;
pmic->desc[MAX8907_SD1].n_voltages =
(1425000 - 637500) / 12500 + 1;
}
for (i = 0; i < MAX8907_NUM_REGULATORS; i++) {
struct regulator_dev *rdev;
config.dev = pdev->dev.parent;
if (pdata)
idata = pdata->init_data[i];
else
idata = match_init_data(i);
config.init_data = idata;
config.driver_data = pmic;
config.regmap = max8907->regmap_gen;
config.of_node = match_of_node(i);
switch (pmic->desc[i].id) {
case MAX8907_MBATT:
if (idata && idata->constraints.name)
mbatt_rail_name = idata->constraints.name;
else
mbatt_rail_name = pmic->desc[i].name;
break;
case MAX8907_BBAT:
case MAX8907_SDBY:
case MAX8907_VRTC:
idata->supply_regulator = mbatt_rail_name;
break;
}
if (pmic->desc[i].ops == &max8907_ldo_ops) {
ret = regmap_read(config.regmap, pmic->desc[i].enable_reg,
&val);
if (ret)
return ret;
if ((val & MAX8907_MASK_LDO_SEQ) !=
MAX8907_MASK_LDO_SEQ)
pmic->desc[i].ops = &max8907_ldo_hwctl_ops;
} else if (pmic->desc[i].ops == &max8907_out5v_ops) {
ret = regmap_read(config.regmap, pmic->desc[i].enable_reg,
&val);
if (ret)
return ret;
if ((val & (MAX8907_MASK_OUT5V_VINEN |
MAX8907_MASK_OUT5V_ENSRC)) !=
MAX8907_MASK_OUT5V_ENSRC)
pmic->desc[i].ops = &max8907_out5v_hwctl_ops;
}
rdev = devm_regulator_register(&pdev->dev,
&pmic->desc[i], &config);
if (IS_ERR(rdev)) {
dev_err(&pdev->dev,
"failed to register %s regulator\n",
pmic->desc[i].name);
return PTR_ERR(rdev);
}
}
return 0;
}
static struct platform_driver max8907_regulator_driver = {
.driver = {
.name = "max8907-regulator",
},
.probe = max8907_regulator_probe,
};
static int __init max8907_regulator_init(void)
{
return platform_driver_register(&max8907_regulator_driver);
}
subsys_initcall(max8907_regulator_init);
static void __exit max8907_reg_exit(void)
{
platform_driver_unregister(&max8907_regulator_driver);
}
module_exit(max8907_reg_exit);
MODULE_DESCRIPTION("MAX8907 regulator driver");
MODULE_AUTHOR("Gyungoh Yoo <jack.yoo@maxim-ic.com>");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:max8907-regulator");