drivers/media/i2c/max9271.h

Source file repositories/reference/linux-study-clean/drivers/media/i2c/max9271.h

File Facts

System
Linux kernel
Corpus path
drivers/media/i2c/max9271.h
Extension
.h
Size
7735 bytes
Lines
239
Domain
Driver Families
Bucket
drivers/media
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct max9271_device {
	struct i2c_client *client;
};

/**
 * max9271_wake_up() - Wake up the serializer by issuing an i2c transaction
 * @dev: The max9271 device
 *
 * This function shall be called before any other interaction with the
 * serializer.
 */
void max9271_wake_up(struct max9271_device *dev);

/**
 * max9271_set_serial_link() - Enable/disable serial link
 * @dev: The max9271 device
 * @enable: Serial link enable/disable flag
 *
 * Return 0 on success or a negative error code on failure
 */
int max9271_set_serial_link(struct max9271_device *dev, bool enable);

/**
 * max9271_configure_i2c() - Configure I2C bus parameters
 * @dev: The max9271 device
 * @i2c_config: The I2C bus configuration bit mask
 *
 * Configure MAX9271 I2C interface. The bus configuration provided in the
 * @i2c_config parameter shall be assembled using bit values defined by the
 * MAX9271_I2C* macros.
 *
 * Return 0 on success or a negative error code on failure
 */
int max9271_configure_i2c(struct max9271_device *dev, u8 i2c_config);

/**
 * max9271_set_high_threshold() - Enable or disable reverse channel high
 *				  threshold
 * @dev: The max9271 device
 * @enable: High threshold enable/disable flag
 *
 * Return 0 on success or a negative error code on failure
 */
int max9271_set_high_threshold(struct max9271_device *dev, bool enable);

/**
 * max9271_configure_gmsl_link() - Configure the GMSL link
 * @dev: The max9271 device
 *
 * FIXME: the GMSL link configuration is currently hardcoded and performed
 * by programming registers 0x04, 0x07 and 0x02.
 *
 * Return 0 on success or a negative error code on failure
 */
int max9271_configure_gmsl_link(struct max9271_device *dev);

/**
 * max9271_set_gpios() - Set gpio lines to physical high value
 * @dev: The max9271 device
 * @gpio_mask: The mask of gpio lines to set to high value
 *
 * The @gpio_mask parameter shall be assembled using the MAX9271_GP[IO|O]*
 * bit values.
 *
 * Return 0 on success or a negative error code on failure
 */
int max9271_set_gpios(struct max9271_device *dev, u8 gpio_mask);

/**
 * max9271_clear_gpios() - Set gpio lines to physical low value
 * @dev: The max9271 device
 * @gpio_mask: The mask of gpio lines to set to low value
 *
 * The @gpio_mask parameter shall be assembled using the MAX9271_GP[IO|O]*
 * bit values.
 *
 * Return 0 on success or a negative error code on failure
 */
int max9271_clear_gpios(struct max9271_device *dev, u8 gpio_mask);

/**
 * max9271_enable_gpios() - Enable gpio lines
 * @dev: The max9271 device
 * @gpio_mask: The mask of gpio lines to enable
 *
 * The @gpio_mask parameter shall be assembled using the MAX9271_GPIO*
 * bit values. GPO line is always enabled by default.
 *
 * Return 0 on success or a negative error code on failure
 */

Annotation

Implementation Notes