public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: SDCA: Write init table on function status IRQ
@ 2026-03-24  3:03 Cássio Gabriel
  2026-03-24  9:20 ` Charles Keepax
  2026-03-25 13:35 ` kernel test robot
  0 siblings, 2 replies; 5+ messages in thread
From: Cássio Gabriel @ 2026-03-24  3:03 UTC (permalink / raw)
  To: Charles Keepax, Maciej Strozek, Bard Liao, Pierre-Louis Bossart,
	Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown
  Cc: linux-sound, patches, linux-kernel, Cássio Gabriel

The function status IRQ handler currently acknowledges
SDCA_CTL_ENTITY_0_FUNCTION_NEEDS_INITIALIZATION but does
not perform the function initialization writes. Since the
handler clears the function status register afterwards,
the request is lost.

Use sdca_regmap_write_init() when the initialization status
bit is reported and apply the writes through the device regmap
stored in the IRQ data, matching the existing class-function
boot and resume paths.

Fixes: b9ab3b618241 ("ASoC: SDCA: Add some initial IRQ handlers")
Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
---
 include/sound/sdca_interrupts.h  |  5 ++++-
 sound/soc/sdca/sdca_class.c      |  1 +
 sound/soc/sdca/sdca_interrupts.c | 20 +++++++++++++++++---
 3 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/include/sound/sdca_interrupts.h b/include/sound/sdca_interrupts.h
index 9bcb5d8fd592..a63ae9df26d6 100644
--- a/include/sound/sdca_interrupts.h
+++ b/include/sound/sdca_interrupts.h
@@ -30,6 +30,7 @@ struct sdca_function_data;
  * @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.
+ * @init_lock: Pointer to the lock serializing function initialization.
  * @priv: Pointer to private data for use by the handler.
  * @irq: IRQ number allocated to this interrupt, also used internally to track
  * the IRQ being assigned.
@@ -44,6 +45,7 @@ struct sdca_interrupt {
 	struct sdca_function_data *function;
 	struct sdca_entity *entity;
 	struct sdca_control *control;
+	struct mutex *init_lock;
 
 	void *priv;
 
@@ -82,7 +84,8 @@ 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);
+					      struct regmap *regmap,
+					      struct mutex *init_lock, int irq);
 
 void sdca_irq_enable_early(struct sdca_function_data *function,
 			   struct sdca_interrupt_info *info);
diff --git a/sound/soc/sdca/sdca_class.c b/sound/soc/sdca/sdca_class.c
index 7af4e5d1b347..426c11c47557 100644
--- a/sound/soc/sdca/sdca_class.c
+++ b/sound/soc/sdca/sdca_class.c
@@ -149,6 +149,7 @@ static void class_boot_work(struct work_struct *work)
 		goto err;
 
 	drv->irq_info = sdca_irq_allocate(drv->dev, drv->dev_regmap,
+					  &drv->init_lock,
 					  drv->sdw->irq);
 	if (IS_ERR(drv->irq_info))
 		goto err;
diff --git a/sound/soc/sdca/sdca_interrupts.c b/sound/soc/sdca/sdca_interrupts.c
index 95b1ab4ba1b0..caf5f6ace168 100644
--- a/sound/soc/sdca/sdca_interrupts.c
+++ b/sound/soc/sdca/sdca_interrupts.c
@@ -22,6 +22,7 @@
 #include <sound/sdca_function.h>
 #include <sound/sdca_hid.h>
 #include <sound/sdca_interrupts.h>
+#include <sound/sdca_regmap.h>
 #include <sound/sdca_jack.h>
 #include <sound/sdca_ump.h>
 #include <sound/soc-component.h>
@@ -121,7 +122,16 @@ static irqreturn_t function_status_handler(int irq, void *data)
 
 		switch (mask) {
 		case SDCA_CTL_ENTITY_0_FUNCTION_NEEDS_INITIALIZATION:
-			//FIXME: Add init writes
+			dev_dbg(dev, "write initialization\n");
+
+			guard(mutex)(interrupt->init_lock);
+
+			ret = sdca_regmap_write_init(dev, interrupt->device_regmap,
+						     interrupt->function);
+			if (ret) {
+				dev_err(dev, "failed to write initialization: %d\n", ret);
+				goto error;
+			}
 			break;
 		case SDCA_CTL_ENTITY_0_FUNCTION_FAULT:
 			dev_err(dev, "function fault\n");
@@ -520,6 +530,7 @@ EXPORT_SYMBOL_NS_GPL(sdca_irq_populate, "SND_SOC_SDCA");
  * sdca_irq_allocate - allocate an SDCA interrupt structure for a device
  * @sdev: Device pointer against which things should be allocated.
  * @regmap: regmap to be used for accessing the SDCA IRQ registers.
+ * @init_lock: Lock to serialize function initialization.
  * @irq: The interrupt number.
  *
  * Typically this would be called from the top level driver for the whole
@@ -530,7 +541,8 @@ EXPORT_SYMBOL_NS_GPL(sdca_irq_populate, "SND_SOC_SDCA");
  * error code.
  */
 struct sdca_interrupt_info *sdca_irq_allocate(struct device *sdev,
-					      struct regmap *regmap, int irq)
+					      struct regmap *regmap,
+					      struct mutex *init_lock, int irq)
 {
 	struct sdca_interrupt_info *info;
 	int ret, i;
@@ -541,8 +553,10 @@ struct sdca_interrupt_info *sdca_irq_allocate(struct device *sdev,
 
 	info->irq_chip = sdca_irq_chip;
 
-	for (i = 0; i < ARRAY_SIZE(info->irqs); i++)
+	for (i = 0; i < ARRAY_SIZE(info->irqs); i++) {
 		info->irqs[i].device_regmap = regmap;
+		info->irqs[i].init_lock = init_lock;
+	}
 
 	ret = devm_mutex_init(sdev, &info->irq_lock);
 	if (ret)

---
base-commit: 834f16f74d88054df215eebef09ad864c7e5977c
change-id: 20260323-sdca-function-status-init-irq-f5f76e26ce19

Best regards,
-- 
Cássio Gabriel <cassiogabrielcontato@gmail.com>


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: SDCA: Write init table on function status IRQ
  2026-03-24  3:03 [PATCH] ASoC: SDCA: Write init table on function status IRQ Cássio Gabriel
@ 2026-03-24  9:20 ` Charles Keepax
  2026-03-24 11:13   ` Cássio Gabriel
  2026-03-25 13:35 ` kernel test robot
  1 sibling, 1 reply; 5+ messages in thread
From: Charles Keepax @ 2026-03-24  9:20 UTC (permalink / raw)
  To: Cássio Gabriel
  Cc: Maciej Strozek, Bard Liao, Pierre-Louis Bossart, Jaroslav Kysela,
	Takashi Iwai, Liam Girdwood, Mark Brown, linux-sound, patches,
	linux-kernel

On Tue, Mar 24, 2026 at 12:03:59AM -0300, Cássio Gabriel wrote:
> The function status IRQ handler currently acknowledges
> SDCA_CTL_ENTITY_0_FUNCTION_NEEDS_INITIALIZATION but does
> not perform the function initialization writes. Since the
> handler clears the function status register afterwards,
> the request is lost.
> 
> Use sdca_regmap_write_init() when the initialization status
> bit is reported and apply the writes through the device regmap
> stored in the IRQ data, matching the existing class-function
> boot and resume paths.

Generally speaking the init writes should have happened as part
of the device boot. What are the circumstances where you are
encountering this?

Thanks,
Charles

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: SDCA: Write init table on function status IRQ
  2026-03-24  9:20 ` Charles Keepax
@ 2026-03-24 11:13   ` Cássio Gabriel
  2026-03-24 11:23     ` Charles Keepax
  0 siblings, 1 reply; 5+ messages in thread
From: Cássio Gabriel @ 2026-03-24 11:13 UTC (permalink / raw)
  To: Charles Keepax
  Cc: Maciej Strozek, Bard Liao, Pierre-Louis Bossart, Jaroslav Kysela,
	Takashi Iwai, Liam Girdwood, Mark Brown, linux-sound, patches,
	linux-kernel

On Tue, Mar 24, 2026 at 09:20:38AM +0000, Charles Keepax wrote:
> On Tue, Mar 24, 2026 at 12:03:59AM -0300, Cássio Gabriel wrote:
> > The function status IRQ handler currently acknowledges
> > SDCA_CTL_ENTITY_0_FUNCTION_NEEDS_INITIALIZATION but does
> > not perform the function initialization writes. Since the
> > handler clears the function status register afterwards,
> > the request is lost.
> > 
> > Use sdca_regmap_write_init() when the initialization status
> > bit is reported and apply the writes through the device regmap
> > stored in the IRQ data, matching the existing class-function
> > boot and resume paths.
> 
> Generally speaking the init writes should have happened as part
> of the device boot. What are the circumstances where you are
> encountering this?
> 
> Thanks,
> Charles

Hi Charles,

This was found by inspection rather than from a concrete hardware
reproducer.

What drew my attention was that the current class-function boot and
resume paths already handle FUNCTION_NEEDS_INITIALIZATION by replaying
the init table, while the function-status IRQ handler would just
acknowledge and clear the same bit. My concern was that, if the bit can
legitimately appear in the normal IRQ path, it would be dropped without
taking the same initialization action.

I do not currently have hardware evidence showing that this case is
actually reachable, so I will drop the patch for now.

Thanks,
Cássio

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: SDCA: Write init table on function status IRQ
  2026-03-24 11:13   ` Cássio Gabriel
@ 2026-03-24 11:23     ` Charles Keepax
  0 siblings, 0 replies; 5+ messages in thread
From: Charles Keepax @ 2026-03-24 11:23 UTC (permalink / raw)
  To: Cássio Gabriel
  Cc: Maciej Strozek, Bard Liao, Pierre-Louis Bossart, Jaroslav Kysela,
	Takashi Iwai, Liam Girdwood, Mark Brown, linux-sound, patches,
	linux-kernel

On Tue, Mar 24, 2026 at 08:13:01AM -0300, Cássio Gabriel wrote:
> On Tue, Mar 24, 2026 at 09:20:38AM +0000, Charles Keepax wrote:
> > On Tue, Mar 24, 2026 at 12:03:59AM -0300, Cássio Gabriel wrote:
> > > The function status IRQ handler currently acknowledges
> > > SDCA_CTL_ENTITY_0_FUNCTION_NEEDS_INITIALIZATION but does
> > > not perform the function initialization writes. Since the
> > > handler clears the function status register afterwards,
> > > the request is lost.
> > > 
> > > Use sdca_regmap_write_init() when the initialization status
> > > bit is reported and apply the writes through the device regmap
> > > stored in the IRQ data, matching the existing class-function
> > > boot and resume paths.
> > 
> > Generally speaking the init writes should have happened as part
> > of the device boot. What are the circumstances where you are
> > encountering this?
> 
> This was found by inspection rather than from a concrete hardware
> reproducer.
> 
> What drew my attention was that the current class-function boot and
> resume paths already handle FUNCTION_NEEDS_INITIALIZATION by replaying
> the init table, while the function-status IRQ handler would just
> acknowledge and clear the same bit. My concern was that, if the bit can
> legitimately appear in the normal IRQ path, it would be dropped without
> taking the same initialization action.
> 
> I do not currently have hardware evidence showing that this case is
> actually reachable, so I will drop the patch for now.

Cool, yeah I think the situation is a little more complex that it
looks (we should perhaps update the comment to say so), because
it seems likely if one gets a function needs init outside of
the normal boot proceedure that the part has reset whilst
operating. This may well require more handling and I would
be keen to work through it when we have some hardware that is
hitting the case to test on.

Thanks,
Charles

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: SDCA: Write init table on function status IRQ
  2026-03-24  3:03 [PATCH] ASoC: SDCA: Write init table on function status IRQ Cássio Gabriel
  2026-03-24  9:20 ` Charles Keepax
@ 2026-03-25 13:35 ` kernel test robot
  1 sibling, 0 replies; 5+ messages in thread
From: kernel test robot @ 2026-03-25 13:35 UTC (permalink / raw)
  To: Cássio Gabriel, Charles Keepax, Maciej Strozek, Bard Liao,
	Pierre-Louis Bossart, Jaroslav Kysela, Takashi Iwai,
	Liam Girdwood, Mark Brown
  Cc: llvm, oe-kbuild-all, linux-sound, patches, linux-kernel,
	Cássio Gabriel

Hi Cássio,

kernel test robot noticed the following build errors:

[auto build test ERROR on 834f16f74d88054df215eebef09ad864c7e5977c]

url:    https://github.com/intel-lab-lkp/linux/commits/C-ssio-Gabriel/ASoC-SDCA-Write-init-table-on-function-status-IRQ/20260325-094213
base:   834f16f74d88054df215eebef09ad864c7e5977c
patch link:    https://lore.kernel.org/r/20260324-sdca-function-status-init-irq-v1-1-bba49417a4e0%40gmail.com
patch subject: [PATCH] ASoC: SDCA: Write init table on function status IRQ
config: x86_64-randconfig-003-20260325 (https://download.01.org/0day-ci/archive/20260325/202603252109.uP5pmwdI-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260325/202603252109.uP5pmwdI-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603252109.uP5pmwdI-lkp@intel.com/

All errors (new ones prefixed by >>):

>> sound/soc/sdca/sdca_interrupts.c:148:3: error: cannot jump from switch statement to this case label
     148 |                 case SDCA_CTL_ENTITY_0_FUNCTION_HAS_BEEN_RESET:
         |                 ^
   sound/soc/sdca/sdca_interrupts.c:127:4: note: jump bypasses initialization of variable with __attribute__((cleanup))
     127 |                         guard(mutex)(interrupt->init_lock);
         |                         ^
   include/linux/cleanup.h:419:2: note: expanded from macro 'guard'
     419 |         CLASS(_name, __UNIQUE_ID(guard))
         |         ^
   include/linux/cleanup.h:300:3: note: expanded from macro 'CLASS'
     300 |                 class_##_name##_constructor
         |                 ^
   <scratch space>:65:1: note: expanded from here
      65 | class_mutex_constructor
         | ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:16:23: note: expanded from macro '__PASTE'
      16 | #define __PASTE(a, b) ___PASTE(a, b)
         |                       ^
   include/linux/compiler_types.h:15:24: note: expanded from macro '___PASTE'
      15 | #define ___PASTE(a, b) a##b
         |                        ^
   <scratch space>:71:1: note: expanded from here
      71 | __UNIQUE_ID_unlock_454
         | ^
   sound/soc/sdca/sdca_interrupts.c:127:4: note: jump bypasses initialization of variable with __attribute__((cleanup))
   include/linux/cleanup.h:419:15: note: expanded from macro 'guard'
     419 |         CLASS(_name, __UNIQUE_ID(guard))
         |                      ^
   include/linux/compiler.h:168:2: note: expanded from macro '__UNIQUE_ID'
     168 |         __PASTE(__UNIQUE_ID_,                                   \
         |         ^
   include/linux/compiler_types.h:16:23: note: expanded from macro '__PASTE'
      16 | #define __PASTE(a, b) ___PASTE(a, b)
         |                       ^
   include/linux/compiler_types.h:15:24: note: expanded from macro '___PASTE'
      15 | #define ___PASTE(a, b) a##b
         |                        ^
   <scratch space>:59:1: note: expanded from here
      59 | __UNIQUE_ID_guard_453
         | ^
   sound/soc/sdca/sdca_interrupts.c:147:3: error: cannot jump from switch statement to this case label
     147 |                 case SDCA_CTL_ENTITY_0_STREAMING_STOPPED_ABNORMALLY:
         |                 ^
   sound/soc/sdca/sdca_interrupts.c:127:4: note: jump bypasses initialization of variable with __attribute__((cleanup))
     127 |                         guard(mutex)(interrupt->init_lock);
         |                         ^
   include/linux/cleanup.h:419:2: note: expanded from macro 'guard'
     419 |         CLASS(_name, __UNIQUE_ID(guard))
         |         ^
   include/linux/cleanup.h:300:3: note: expanded from macro 'CLASS'
     300 |                 class_##_name##_constructor
         |                 ^
   <scratch space>:65:1: note: expanded from here
      65 | class_mutex_constructor
         | ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:16:23: note: expanded from macro '__PASTE'
      16 | #define __PASTE(a, b) ___PASTE(a, b)
         |                       ^
   include/linux/compiler_types.h:15:24: note: expanded from macro '___PASTE'
      15 | #define ___PASTE(a, b) a##b
         |                        ^
   <scratch space>:71:1: note: expanded from here
      71 | __UNIQUE_ID_unlock_454
         | ^
   sound/soc/sdca/sdca_interrupts.c:127:4: note: jump bypasses initialization of variable with __attribute__((cleanup))
   include/linux/cleanup.h:419:15: note: expanded from macro 'guard'
     419 |         CLASS(_name, __UNIQUE_ID(guard))
         |                      ^
   include/linux/compiler.h:168:2: note: expanded from macro '__UNIQUE_ID'
     168 |         __PASTE(__UNIQUE_ID_,                                   \
         |         ^
   include/linux/compiler_types.h:16:23: note: expanded from macro '__PASTE'
      16 | #define __PASTE(a, b) ___PASTE(a, b)
         |                       ^
   include/linux/compiler_types.h:15:24: note: expanded from macro '___PASTE'
      15 | #define ___PASTE(a, b) a##b
         |                        ^
   <scratch space>:59:1: note: expanded from here
      59 | __UNIQUE_ID_guard_453
         | ^
   sound/soc/sdca/sdca_interrupts.c:146:3: error: cannot jump from switch statement to this case label
     146 |                 case SDCA_CTL_ENTITY_0_INTS_DISABLED_ABNORMALLY:
         |                 ^
   sound/soc/sdca/sdca_interrupts.c:127:4: note: jump bypasses initialization of variable with __attribute__((cleanup))
     127 |                         guard(mutex)(interrupt->init_lock);
         |                         ^
   include/linux/cleanup.h:419:2: note: expanded from macro 'guard'
     419 |         CLASS(_name, __UNIQUE_ID(guard))
         |         ^
   include/linux/cleanup.h:300:3: note: expanded from macro 'CLASS'
     300 |                 class_##_name##_constructor
         |                 ^
   <scratch space>:65:1: note: expanded from here
      65 | class_mutex_constructor
         | ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:16:23: note: expanded from macro '__PASTE'
      16 | #define __PASTE(a, b) ___PASTE(a, b)
         |                       ^


vim +148 sound/soc/sdca/sdca_interrupts.c

b126394d9ec6f9 Maciej Strozek 2025-06-24   91  
b9ab3b61824190 Charles Keepax 2025-06-24   92  static irqreturn_t function_status_handler(int irq, void *data)
b9ab3b61824190 Charles Keepax 2025-06-24   93  {
b9ab3b61824190 Charles Keepax 2025-06-24   94  	struct sdca_interrupt *interrupt = data;
dfe7c3401ed3d3 Charles Keepax 2025-10-20   95  	struct device *dev = interrupt->dev;
907364ea3db475 Charles Keepax 2025-10-20   96  	irqreturn_t irqret = IRQ_NONE;
b9ab3b61824190 Charles Keepax 2025-06-24   97  	unsigned int reg, val;
b9ab3b61824190 Charles Keepax 2025-06-24   98  	unsigned long status;
b9ab3b61824190 Charles Keepax 2025-06-24   99  	unsigned int mask;
b9ab3b61824190 Charles Keepax 2025-06-24  100  	int ret;
b9ab3b61824190 Charles Keepax 2025-06-24  101  
907364ea3db475 Charles Keepax 2025-10-20  102  	ret = pm_runtime_get_sync(dev);
907364ea3db475 Charles Keepax 2025-10-20  103  	if (ret < 0) {
907364ea3db475 Charles Keepax 2025-10-20  104  		dev_err(dev, "failed to resume for function status: %d\n", ret);
907364ea3db475 Charles Keepax 2025-10-20  105  		goto error;
907364ea3db475 Charles Keepax 2025-10-20  106  	}
907364ea3db475 Charles Keepax 2025-10-20  107  
b9ab3b61824190 Charles Keepax 2025-06-24  108  	reg = SDW_SDCA_CTL(interrupt->function->desc->adr, interrupt->entity->id,
b9ab3b61824190 Charles Keepax 2025-06-24  109  			   interrupt->control->sel, 0);
b9ab3b61824190 Charles Keepax 2025-06-24  110  
dfe7c3401ed3d3 Charles Keepax 2025-10-20  111  	ret = regmap_read(interrupt->function_regmap, reg, &val);
b9ab3b61824190 Charles Keepax 2025-06-24  112  	if (ret < 0) {
b9ab3b61824190 Charles Keepax 2025-06-24  113  		dev_err(dev, "failed to read function status: %d\n", ret);
907364ea3db475 Charles Keepax 2025-10-20  114  		goto error;
b9ab3b61824190 Charles Keepax 2025-06-24  115  	}
b9ab3b61824190 Charles Keepax 2025-06-24  116  
b9ab3b61824190 Charles Keepax 2025-06-24  117  	dev_dbg(dev, "function status: %#x\n", val);
b9ab3b61824190 Charles Keepax 2025-06-24  118  
b9ab3b61824190 Charles Keepax 2025-06-24  119  	status = val;
b9ab3b61824190 Charles Keepax 2025-06-24  120  	for_each_set_bit(mask, &status, BITS_PER_BYTE) {
b9ab3b61824190 Charles Keepax 2025-06-24  121  		mask = 1 << mask;
b9ab3b61824190 Charles Keepax 2025-06-24  122  
b9ab3b61824190 Charles Keepax 2025-06-24  123  		switch (mask) {
b9ab3b61824190 Charles Keepax 2025-06-24  124  		case SDCA_CTL_ENTITY_0_FUNCTION_NEEDS_INITIALIZATION:
d5a290177c76b9 Cássio Gabriel 2026-03-24  125  			dev_dbg(dev, "write initialization\n");
d5a290177c76b9 Cássio Gabriel 2026-03-24  126  
d5a290177c76b9 Cássio Gabriel 2026-03-24  127  			guard(mutex)(interrupt->init_lock);
d5a290177c76b9 Cássio Gabriel 2026-03-24  128  
d5a290177c76b9 Cássio Gabriel 2026-03-24  129  			ret = sdca_regmap_write_init(dev, interrupt->device_regmap,
d5a290177c76b9 Cássio Gabriel 2026-03-24  130  						     interrupt->function);
d5a290177c76b9 Cássio Gabriel 2026-03-24  131  			if (ret) {
d5a290177c76b9 Cássio Gabriel 2026-03-24  132  				dev_err(dev, "failed to write initialization: %d\n", ret);
d5a290177c76b9 Cássio Gabriel 2026-03-24  133  				goto error;
d5a290177c76b9 Cássio Gabriel 2026-03-24  134  			}
b9ab3b61824190 Charles Keepax 2025-06-24  135  			break;
b9ab3b61824190 Charles Keepax 2025-06-24  136  		case SDCA_CTL_ENTITY_0_FUNCTION_FAULT:
b9ab3b61824190 Charles Keepax 2025-06-24  137  			dev_err(dev, "function fault\n");
b9ab3b61824190 Charles Keepax 2025-06-24  138  			break;
b9ab3b61824190 Charles Keepax 2025-06-24  139  		case SDCA_CTL_ENTITY_0_UMP_SEQUENCE_FAULT:
b9ab3b61824190 Charles Keepax 2025-06-24  140  			dev_err(dev, "ump sequence fault\n");
b9ab3b61824190 Charles Keepax 2025-06-24  141  			break;
b9ab3b61824190 Charles Keepax 2025-06-24  142  		case SDCA_CTL_ENTITY_0_FUNCTION_BUSY:
b9ab3b61824190 Charles Keepax 2025-06-24  143  			dev_info(dev, "unexpected function busy\n");
b9ab3b61824190 Charles Keepax 2025-06-24  144  			break;
b9ab3b61824190 Charles Keepax 2025-06-24  145  		case SDCA_CTL_ENTITY_0_DEVICE_NEWLY_ATTACHED:
b9ab3b61824190 Charles Keepax 2025-06-24  146  		case SDCA_CTL_ENTITY_0_INTS_DISABLED_ABNORMALLY:
b9ab3b61824190 Charles Keepax 2025-06-24  147  		case SDCA_CTL_ENTITY_0_STREAMING_STOPPED_ABNORMALLY:
b9ab3b61824190 Charles Keepax 2025-06-24 @148  		case SDCA_CTL_ENTITY_0_FUNCTION_HAS_BEEN_RESET:
b9ab3b61824190 Charles Keepax 2025-06-24  149  			break;
b9ab3b61824190 Charles Keepax 2025-06-24  150  		}
b9ab3b61824190 Charles Keepax 2025-06-24  151  	}
b9ab3b61824190 Charles Keepax 2025-06-24  152  
dfe7c3401ed3d3 Charles Keepax 2025-10-20  153  	ret = regmap_write(interrupt->function_regmap, reg, val);
b9ab3b61824190 Charles Keepax 2025-06-24  154  	if (ret < 0) {
b9ab3b61824190 Charles Keepax 2025-06-24  155  		dev_err(dev, "failed to clear function status: %d\n", ret);
907364ea3db475 Charles Keepax 2025-10-20  156  		goto error;
b9ab3b61824190 Charles Keepax 2025-06-24  157  	}
b9ab3b61824190 Charles Keepax 2025-06-24  158  
907364ea3db475 Charles Keepax 2025-10-20  159  	irqret = IRQ_HANDLED;
907364ea3db475 Charles Keepax 2025-10-20  160  error:
907364ea3db475 Charles Keepax 2025-10-20  161  	pm_runtime_put(dev);
907364ea3db475 Charles Keepax 2025-10-20  162  	return irqret;
b9ab3b61824190 Charles Keepax 2025-06-24  163  }
b9ab3b61824190 Charles Keepax 2025-06-24  164  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-03-25 13:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-24  3:03 [PATCH] ASoC: SDCA: Write init table on function status IRQ Cássio Gabriel
2026-03-24  9:20 ` Charles Keepax
2026-03-24 11:13   ` Cássio Gabriel
2026-03-24 11:23     ` Charles Keepax
2026-03-25 13:35 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox