0
  *   ˆl–äY>”TÔD¨ 	Å�rã`S�ÿ¿ƒ‚_†I|¥�+ÃÂ 
E    /* SPDX-License-Identifier: GPL-2.0 */
/*
 * The MIPI SDCA specification is available for public downloads at
 * https://www.mipi.org/mipi-sdca-v1-0-download
 *
 * Copyright (C) 2025 Cirrus Logic, Inc. and
 *                    Cirrus Logic International Semiconductor Ltd.
 */

#ifndef __SDCA_INTERRUPTS_H__
#define __SDCA_INTERRUPTS_H__

#include <linux/interrupt.h>
#include <linux/mutex.h>
#include <linux/regmap.h>

struct device;
struct snd_soc_component;
struct sdca_function_data;

#define SDCA_MAX_INTERRUPTS 31 /* the last bit is reserved for future extensions */

/**
 * struct sdca_interrupt - contains information about a single SDCA interrupt
 * @name: The name of the interrupt.
 * @component: Pointer to the ASoC component owns the interrupt.
 * @function: Pointer to the Function that the interrupt is associated with.
 * @entity: Pointer to the Entity that the interrupt is associated with.
 * @control: Pointer to the Control that the interrupt is associated with.
 * @priv: Pointer to private data for use by the handler.
 * @externally_requested: Internal flag used to check if a client driver has
 * already requested the interrupt, for custom handling, allowing the core to
 * skip handling this interrupt.
 */
struct sdca_interrupt {
	const char *name;

	struct snd_soc_component *component;
	struct sdca_function_data *function;
	struct sdca_entity *entity;
	struct sdca_control *control;

	void *priv;

	bool externally_requested;
};

/**
 * struct sdca_interrupt_info - contains top-level SDCA interrupt information
 * @irq_chip: regmap irq chip structure.
 * @irq_data: regmap irq chip data structure.
 * @irqs: Array of data for each individual IRQ.
 * @irq_lock: Protects access to the list of sdca_interrupt structures.
 */
struct sdca_interrupt_info {
	struct regmap_irq_chip irq_chip;
	struct regmap_irq_chip_data *irq_data;

	struct sdca_interrupt irqs[SDCA_MAX_INTERRUPTS];

	struct mutex irq_lock; /* Protect irqs list across functions */
};

int sdca_irq_request(struct device *dev, struct sdca_interrupt_info *interrupt_info,
		     int sdca_irq, const char *name, irq_handler_t handler,
		     void *data);
int sdca_irq_data_populate(struct snd_soc_component *component,
			   struct sdca_function_data *function,
			   struct sdca_entity *entity,
			   struct sdca_control *control,
			   struct sdca_interrupt *interrupt);
int sdca_irq_populate(struct sdca_function_data *function,
		      struct snd_soc_component *component,
		      struct sdca_interrupt_info *info);
struct sdca_interrupt_info *sdca_irq_allocate(struct device *dev,
					      struct regmap *regmap, int irq);

#endif
  J   ˆl—ß=¿J	•2ÛB‚ œP/ÜdiLZ7ÿÁ„d´_�uÐb&=LyZof¯a–ßi~”ªj"Tâ€nà�p)‹FÿÅ ?÷     ‹     Ì[ënG–þ¯§(xwvä€ºXNâÄ³YŒbË‰`G6D9X`4 šì"Ùf³›®ªf,,ve_aŸÀ~¿ _l¿ïœªî&%{Œ¬a[b_N�:—ïÜŠ¾¾gÂÞ!þçŸ«"”ö±ñÞç‡“ºš¦§M˜×î±‡OM³Zùà6—Þ\ïÛÊÌCXùÇGG³"Ì›1Þ[ñ¹#R9
?ÙÊº,�ÂÓzòc]/Ì¿_˜a¸)­Ÿ[¼Yû*[ùyÌ¿’ÈåõdŒ'ýô°²áèßZ&ÍÓ,€ÉãGGÇß�Ÿ|›îü’UMV>6ÏŠrZ»eL=™›E]­mŠ<¤'‡uã&V÷£×^dÕ¬Éf¸vVÍÊÂÏyyïðêgs�]ÿËá“—Ïî™{ßà_·ô=½�Ÿ^ôž¬pð�þ*_™§vZTÖøziÍªv!enŒÍtúWú¯ô�P‰º73˜Ûq‘U‡µ›}süèÛGûO@äÁÎªFîgn2/Ööh–åÑÌÕÓ)¤}üýÁñÉÑÒÏŽ��<<ä½/ÅiaÍuµ83‡¹7§oa×ÙÛ½C[ª½¥«þ¢Šô6˜ÜN³¦F-'Õì.‘>—ÖÌoVs[e4Æ½Ãj¾uïMãC1-&r×ìg9/˜`ßá¿Ú”vÌ2s³¢2uUÞÜß;ÌrS~Q1ürz~aà[WgWfxuzy54?Ÿ]ž™¯¾Ô2CøðÅé/g÷öZ\3×tÑi1kœlÝO‹P6Ý|tøÖ³óÏ^^þrz~õjï™<3ÏœÁS…ì�)LQ×�b)Ž?¶>l>8“­¡à…€ÜXe.[Úà2,È¤ÛfŒ5ß€æÒæ¦Ê–À:³Ú|hß®°Ä<[àuà‰õ‘&øÍûðK—ÞT›÷>d»Te­Œ}g—+Ø3)Ûnm®i«E™)ÑÒºõæ½Ë³·�÷ý
25•¹þ�ë½ÃË¡ùªùOØÒtïzzþ·Hìï×ÓK~®n&[âƒùÁà£´[÷NvnžôçC>ezö§ÅÖÒgº0t��…›•uUF,4Yü”ÃÓûjföáP™™Au,V‡hì|óqíïÌÜ–!‹z«ëÒìSÊK•í]ï—o¯._Ÿ=;}1<»ÞwoïCœ²:Ô·¨—Kh$sÞÁ'úJ´�wÕà®‹î“Ò?	cKYñvY,ê²Ž÷ÿ’0Ïe<XTØ ÎÂæcþÆãR°‰�Ó²Ìzv¶È*³ÎÊ©+@žQÓQ‘}wnýÄ+>Qs­§Ö{3m*5ÊÎVy LñºÅ‚ÌŠc´&™–§?áwÉ–›0–w²nED+Üj ²³œáêZ£c\C>Oé-%Œ73S·ùPE	ù…+Ö™Ø¶ß”5é”Ï‡Ïz}yzuþòb8¼x}Ð0Ï.7ÿ}aÎ.ÌùÅ“¯Ÿž]<?½:}ñò'uÝç·�}‹{Ñ&Å½(›¹Ê:øª	PHä°¨&|êú`#,ëh‘hå*Ó
F¹%TncF“,‹™�d%�Âš+0Bíz1œµužo< •‡øwœdkt–,‹1á&ŠŸxÙe38lÑ²°GÕù²	jŽbÆq›4±=*€6´m³°2¬¶ˆÇÕZ£X¢se^±&[.³JXÞ’¡Ø¢X+;Ê1&Ow(!Ê´Šzïø'ÀÂCgØòÊ5Œ�ˆõ·Ó$K¸ƒáy-h˜m