/* * ov772x Camera * * Copyright (C) 2008 Renesas Solutions Corp. * Kuninori Morimoto * * 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. */ #ifndef __OV772X_H__ #define __OV772X_H__ /* for flags */ #define OV772X_FLAG_VFLIP (1 << 0) /* Vertical flip image */ #define OV772X_FLAG_HFLIP (1 << 1) /* Horizontal flip image */ /* * for Edge ctrl * * strength also control Auto or Manual Edge Control Mode * see also OV772X_MANUAL_EDGE_CTRL */ struct ov772x_edge_ctrl { unsigned char strength; unsigned char threshold; unsigned char upper; unsigned char lower; }; #define OV772X_MANUAL_EDGE_CTRL 0x80 /* un-used bit of strength */ #define OV772X_EDGE_STRENGTH_MASK 0x1F #define OV772X_EDGE_THRESHOLD_MASK 0x0F #define OV772X_EDGE_UPPER_MASK 0xFF #define OV772X_EDGE_LOWER_MASK 0xFF #define OV772X_AUTO_EDGECTRL(u, l) \ { \ .upper = (u & OV772X_EDGE_UPPER_MASK), \ .lower = (l & OV772X_EDGE_LOWER_MASK), \ } #define OV772X_MANUAL_EDGECTRL(s, t) \ { \ .strength = (s & OV772X_EDGE_STRENGTH_MASK) | \ OV772X_MANUAL_EDGE_CTRL, \ .threshold = (t & OV772X_EDGE_THRESHOLD_MASK), \ } /* * ov772x camera info */ struct ov772x_camera_info { unsigned long flags; struct ov772x_edge_ctrl edgectrl; }; #endif /* __OV772X_H__ */ net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/include/uapi/asm-generic
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>2016-11-10 10:45:18 +0000
committerMark Brown <broonie@kernel.org>2016-11-10 17:28:32 +0000
commit85b037442e3f0e84296ab1010fd6b057eee18496 (patch)
treeb745f3f22cbd45af2039a004eb3f21d530afdc8b /include/uapi/asm-generic
parent1001354ca34179f3db924eb66672442a173147dc (diff)
regulators: helpers: Fix handling of bypass_val_on in get_bypass_regmap
The handling of bypass_val_on that was added in regulator_get_bypass_regmap is done unconditionally however several drivers don't define a value for bypass_val_on. This results in those drivers reporting bypass being enabled when it is not. In regulator_set_bypass_regmap we use bypass_mask if bypass_val_on is zero. This patch adds similar handling in regulator_get_bypass_regmap. Fixes: commit dd1a571daee7 ("regulator: helpers: Ensure bypass register field matches ON value") Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/uapi/asm-generic')