On Mon, Mar 23, 2020 at 08:14:07AM -0600, Jeffrey Hugo wrote: > On 3/23/2020 6:30 AM, Manivannan Sadhasivam wrote: > > The MHI register base has several registers used for getting the MHI > > specific information such as version, family, major, and minor numbers > > from the device. This information can be used by the controller drivers > > for usecases such as applying quirks for a specific revision etc... > > > > While at it, let's also rearrange the local variables > > in mhi_register_controller(). > > > > Suggested-by: Hemant Kumar <hemantk@xxxxxxxxxxxxxx> > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx> > > --- > > --- a/include/linux/mhi.h > > +++ b/include/linux/mhi.h > > @@ -310,6 +310,10 @@ struct mhi_controller_config { > > * @sw_ev_rings: Number of software event rings > > * @nr_irqs_req: Number of IRQs required to operate (optional) > > * @nr_irqs: Number of IRQ allocated by bus master (required) > > + * @family_number: MHI controller family number > > + * @device_number: MHI controller device number > > + * @major_version: MHI controller major revision number > > + * @minor_version: MHI controller minor revision number > > Maybe expand the comment to indicate there are valid after register() to > give controller implementations an idea of when they can use these for > quirks, etc? > Hmm, Okay. Will add a note in next revision. Thanks, Mani > > * @mhi_event: MHI event ring configurations table > > * @mhi_cmd: MHI command ring configurations table > > * @mhi_ctxt: MHI device context, shared memory between host and device > > @@ -375,6 +379,10 @@ struct mhi_controller { > > u32 sw_ev_rings; > > u32 nr_irqs_req; > > u32 nr_irqs; > > + u32 family_number; > > + u32 device_number; > > + u32 major_version; > > + u32 minor_version; > > struct mhi_event *mhi_event; > > struct mhi_cmd *mhi_cmd; > > > > > -- > Jeffrey Hugo > Qualcomm Technologies, Inc. is a member of the > Code Aurora Forum, a Linux Foundation Collaborative Project.