summaryrefslogtreecommitdiff
path: root/include/dt-bindings/i2c/i2c.h
blob: 1d5da81d90f1442d266d1c3a16a494abf1b78e51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
 * This header provides constants for I2C bindings
 *
 * Copyright (C) 2015 by Sang Engineering
 * Copyright (C) 2015 by Renesas Electronics Corporation
 *
 * Wolfram Sang <wsa@sang-engineering.com>
 *
 * GPLv2 only
 */

#ifndef _DT_BINDINGS_I2C_I2C_H
#define _DT_BINDINGS_I2C_I2C_H

#define I2C_TEN_BIT_ADDRESS	(1 << 31)
#define I2C_OWN_SLAVE_ADDRESS	(1 << 30)

#endif
a href='/cgit.cgi/linux/net-next.git/commit/include/net/icmp.h?id=09f2ba0b0b7c44ecea49cf69a708203b76ba5535'>09f2ba0b0b7c44ecea49cf69a708203b76ba5535 (patch) tree042df33ac99f77d8b86ac427431e267c33561c35 /include/net/icmp.h parent1001354ca34179f3db924eb66672442a173147dc (diff)
regulator: gpio: properly check return value of of_get_named_gpio
The function of_get_named_gpio() could return -ENOENT, -EPROBE_DEFER -EINVAL and so on. Currently, for the optional property "enable-gpio", we only check -EPROBE_DEFER, this is not enough since there may be misconfigured "enable-gpio" in the DTB, of_get_named_gpio() will return -EINVAL in this case, we should return immediately here. And for the optional property "gpios", we didn't check the return value, the driver will continue to the point where gpio_request_array() is called, it doesn't make sense to continue if we got -EPROBE_DEFER or -EINVAL here. This patch tries to address these two issues by properly checking the return value of of_get_named_gpio. Signed-off-by: Jisheng Zhang <jszhang@marvell.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/net/icmp.h')