[PATCH v2 1/2] ASoC: sma1303: Add driver for Iron Device SMA1303 Amp
Mark Brown
broonie at kernel.org
Thu Jan 19 12:25:18 CET 2023
On Thu, Jan 19, 2023 at 08:16:52AM +0000, Ki-Seok Jo wrote:
> > > + if (!(sma1303->amp_power_status)) {
> > > + dev_info(component->dev, "%s : %s\n",
> > > + __func__, "Already AMP Shutdown");
> > > + return ret;
> > > + }
> > > +
> > > + cancel_delayed_work_sync(&sma1303->check_fault_work);
> > > +
> > > + msleep(55);
> > That sleep looks odd - what are we delaying after?
> It need for IC(Amp) issue.
Right, but what is the issue? It's not clear what event we're
delaying for so it's not clear it'll work properly.
> > > +static void sma1303_check_fault_worker(struct work_struct *work) {
> > > + struct sma1303_priv *sma1303 =
> > > + container_of(work, struct sma1303_priv, check_fault_work.work);
> > > + int ret = 0;
> > > + unsigned int over_temp, ocp_val, uvlo_val;
> > > +
> > > + mutex_lock(&sma1303->lock);
> > It looks like this mutex is only taken in this function, is it needed?
> This function is in workqueue. So, I think it can be done at the same time.
A given work_struct should only be schedulable once.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20230119/292e27bd/attachment.sig>
More information about the Alsa-devel
mailing list