[PATCH v4 03/11] bus: mhi: host: Add support to read MHI capabilities
Hans Zhang
18255117159 at 163.com
Wed Jul 9 08:50:51 PDT 2025
On 2025/7/9 20:20, Ilpo Järvinen wrote:
>>>> + do {
>>>> + if (*offset >= mhi_cntrl->reg_len)
>>>> + return -ENXIO;
>>>> +
>>>> + ret = mhi_read_reg(mhi_cntrl, mhi_cntrl->regs, *offset, &val);
>>>> + if (ret)
>>>> + return ret;
>>>> +
>>>> + val = (__force u32)le32_to_cpu(val);
>>>> + cur_cap = FIELD_GET(CAP_CAPID_MASK, val);
>>>> + next_offset = FIELD_GET(CAP_NEXT_CAP_MASK, val);
>>>> + if (cur_cap >= MHI_CAP_ID_MAX)
>>>> + return -ENXIO;
>>>> +
>>>> + if (cur_cap == capability)
>>>> + return 0;
>>>> +
>>>> + *offset = next_offset;
>>>> + } while (next_offset);
>>>> +
>>>> + return -ENXIO;
>>>> +}
>
> There's a generalization of capability search in Hans Zhang's series,
> can it be used here too?
Dear Ilpo,
Could you help add your review tag to my series of patches? Mani has
added the Acked-by tag. If you add the review tag, I believe Bjorn will
merge it in. At the same time, others can use the patches of my series.
Thank you very much for your previous suggestions and time.
Best regards,
Hans
More information about the ath11k
mailing list