Re: [PATCH 5/7] mmc: add UHS-II related definitions in headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 6, 2022 at 4:37 PM Lai Jason
<jasonlai.genesyslogic@xxxxxxxxx> wrote:
>
> On Tue, Dec 14, 2021 at 9:37 PM Ulf Hansson <ulf.hansson@xxxxxxxxxx> wrote:
> >
> > On Fri, 3 Dec 2021 at 11:51, Jason Lai <jasonlai.genesyslogic@xxxxxxxxx> wrote:
> > >
> > > From: Jason Lai <jason.lai@xxxxxxxxxxxxxxxxxxx>
> > >
> > > All LINK layer messages, registers and SD-TRAN command packet described in
> > > 'Part 1 UHS-II Addendum Ver 1.01' are defined in include/linux/mmc/sd_uhs2.h
> > >
> > > drivers/mmc/core/sd_uhs2.h contains exported function prototype.
> > >
> > > Signed-off-by: Jason Lai <jason.lai@xxxxxxxxxxxxxxxxxxx>
> > > ---
> > >  drivers/mmc/core/sd_uhs2.h  |  18 ++++
> > >  include/linux/mmc/card.h    |  30 +++++-
> > >  include/linux/mmc/core.h    |   4 +-
> > >  include/linux/mmc/host.h    |  27 ++++-
> > >  include/linux/mmc/sd_uhs2.h | 196 ++++++++++++++++++++++++++++++++++++
> > >  5 files changed, 268 insertions(+), 7 deletions(-)
> > >  create mode 100644 drivers/mmc/core/sd_uhs2.h
> > >  create mode 100644 include/linux/mmc/sd_uhs2.h
> > >

[...]

> > > diff --git a/include/linux/mmc/sd_uhs2.h b/include/linux/mmc/sd_uhs2.h
> > > new file mode 100644
> > > index 000000000..5d12fb9d0
> > > --- /dev/null
> > > +++ b/include/linux/mmc/sd_uhs2.h
> > > @@ -0,0 +1,196 @@

[...]

> > > +enum uhs2_act {
> > > +        SET_CONFIG,
> > > +        ENABLE_INT,
> > > +        DISABLE_INT,
> > > +        SET_SPEED_B,
> > > +        CHECK_DORMANT,
> > > +        UHS2_SW_RESET,
> > > +};
> >
> > Perhaps uhs2_action is more clear?

In order to integrate all UHS2 host callback functions into a single function:
uhs2_host_operation(host, uhs2_action). I add 5 actions to
uhs2_action{}:
        enum uhs2_action {
                SET_CONFIG,
                ENABLE_INT,
                DISABLE_INT,
                SET_SPEED_B,
                CHECK_DORMANT,
                SW_RESET,
                SET_REGISTER,    // callback function: uhs2_set_reg(host, act)
                DETECT_INIT,     // callback function: uhs2_detect_init(host)
                DISABLE_CLK,     // callback function: uhs2_disable_clk(host)
                ENABLE_CLK,      // callback function: uhs2_enable_clk(host)
                POST_ATTACH_SD   // callback function: uhs2_post_attach_sd(host)
        };
Do you prefer to add prefix "UHS2_" to each action in uhs2_action?

 kind regards,
 Jason Lai
>

[...]

> >
> > Kind regards
> > Uffe



[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux