forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
staging:iio:ad7291: Rework regulator handling
Add platform_data for the driver which allows to specify whether an external reference voltage is used or not. It is not possible to use the return value of regulator_get() for this since the regulator framework is able to return a dummy regulator in case no regulator has been specified. In this case the driver will always get a valid regulator, no matter if it has been specified or not. Also make the regulator non-optional if platform_data states that an external reference voltage should be used. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
- Loading branch information
1 parent
88198d2
commit 1df9d1d
Showing
2 changed files
with
35 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#ifndef __IIO_AD7291_H__ | ||
#define __IIO_AD7291_H__ | ||
|
||
/** | ||
* struct ad7291_platform_data - AD7291 platform data | ||
* @use_external_ref: Whether to use an external or internal reference voltage | ||
*/ | ||
struct ad7291_platform_data { | ||
bool use_external_ref; | ||
}; | ||
|
||
#endif |