summaryrefslogtreecommitdiff
path: root/backport/backport-include/linux/regulator/driver.h
blob: f88d9bef9f65b999a684aba057bcd3266590722f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
 * driver.h -- SoC Regulator driver support.
 *
 * Copyright (C) 2007, 2008 Wolfson Microelectronics PLC.
 *
 * Author: Liam Girdwood <lrg@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.
 *
 * Regulator Driver Interface.
 */

#ifndef __BACKPORT_LINUX_REGULATOR_DRIVER_H_
#define __BACKPORT_LINUX_REGULATOR_DRIVER_H_

#include <linux/version.h>
#include_next <linux/regulator/driver.h>

#if LINUX_VERSION_IS_LESS(3,13,0) && \
    LINUX_VERSION_IS_GEQ(3,5,0)
#define devm_regulator_register LINUX_BACKPORT(devm_regulator_register)
struct regulator_dev *
devm_regulator_register(struct device *dev,
			const struct regulator_desc *regulator_desc,
			const struct regulator_config *config);
#define devm_regulator_unregister LINUX_BACKPORT(devm_regulator_unregister)
void devm_regulator_unregister(struct device *dev, struct regulator_dev *rdev);
#endif /* LINUX_VERSION_IS_LESS(3,13,0) &&
	  LINUX_VERSION_IS_GEQ(3,5,0) */

#endif /* __BACKPORT_LINUX_REGULATOR_DRIVER_H_ */