lkml.org 
[lkml]   [2022]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2 3/4] ASoC: apple: mca: Start new platform driver
    On Fri, Aug 19, 2022 at 02:54:29PM +0200, Martin Povišer wrote:

    This all looks good, one style nit and a couple of requests for
    clarification below but basically this is fine.

    > +++ b/sound/soc/apple/mca.c
    > @@ -0,0 +1,1149 @@
    > +// SPDX-License-Identifier: GPL-2.0-only
    > +/*
    > + * Apple SoCs MCA driver
    > + *
    > + * Copyright (C) The Asahi Linux Contributors
    > + *
    > + * The MCA peripheral is made up of a number of identical units called clusters.

    Please make the entire comment block a C++ one so things look more
    intentional.

    > +#define USE_RXB_FOR_CAPTURE

    What's this all about?

    > +static int mca_fe_enable_clocks(struct mca_cluster *cl)
    > +{
    > + struct mca_data *mca = cl->host;
    > + int ret;
    > +
    > + ret = clk_prepare_enable(cl->clk_parent);
    > + if (ret) {
    > + dev_err(mca->dev,
    > + "cluster %d: unable to enable clock parent: %d\n",
    > + cl->no, ret);
    > + return ret;
    > + }
    > +
    > + /*
    > + * We can't power up the device earlier than this because
    > + * the power state driver would error out on seeing the device
    > + * as clock-gated.
    > + */
    > + cl->pd_link = device_link_add(mca->dev, cl->pd_dev,
    > + DL_FLAG_STATELESS | DL_FLAG_PM_RUNTIME |
    > + DL_FLAG_RPM_ACTIVE);

    I'm not clear on this dynamically adding and removing device links stuff
    - it looks like the main (only?) purpose is to take a runtime PM
    reference to the target device which is fine but it's not clear why
    device links are involved given that the links are created and destroyed
    every time the DAI is used, AFAICT always in the same fixed
    relationship. It's not a problem, it's just unclear.
    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2022-08-22 19:40    [W:3.913 / U:0.736 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site