include/linux/extcon/extcon-adc-jack.h

Source file repositories/reference/linux-study-clean/include/linux/extcon/extcon-adc-jack.h

File Facts

System
Linux kernel
Corpus path
include/linux/extcon/extcon-adc-jack.h
Extension
.h
Size
2243 bytes
Lines
69
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

struct adc_jack_cond {
	unsigned int id;
	u32 min_adc;
	u32 max_adc;
};

/**
 * struct adc_jack_pdata - platform data for adc jack device.
 * @name:		name of the extcon device. If null, "adc-jack" is used.
 * @consumer_channel:	Unique name to identify the channel on the consumer
 *			side. This typically describes the channels used within
 *			the consumer. E.g. 'battery_voltage'
 * @cable_names:	array of extcon id for supported cables.
 * @adc_contitions:	array of struct adc_jack_cond conditions ending
 *			with .state = 0 entry. This describes how to decode
 *			adc values into extcon state.
 * @irq_flags:		irq flags used for the @irq
 * @handling_delay_ms:	in some devices, we need to read ADC value some
 *			milli-seconds after the interrupt occurs. You may
 *			describe such delays with @handling_delay_ms, which
 *			is rounded-off by jiffies.
 * @wakeup_source:	flag to wake up the system for extcon events.
 */
struct adc_jack_pdata {
	const char *name;
	const char *consumer_channel;

	const unsigned int *cable_names;

	/* The last entry's state should be 0 */
	struct adc_jack_cond *adc_conditions;

	unsigned long irq_flags;
	unsigned long handling_delay_ms; /* in ms */
	bool wakeup_source;
};

#endif /* _EXTCON_ADC_JACK_H */

Annotation

Implementation Notes