Re: [PATCH 2/3] i3c: Generate aliases for i3c modules

From: Boris Brezillon
Date: Wed Feb 26 2020 - 06:50:10 EST


On Sat, 22 Feb 2020 11:27:10 +0100
Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx> wrote:

> +static int do_i3c_entry(const char *filename, void *symval,
> + char *alias)
> +{
> + DEF_FIELD(symval, i3c_device_id, match_flags);
> + DEF_FIELD(symval, i3c_device_id, dcr);
> + DEF_FIELD(symval, i3c_device_id, manuf_id);
> + DEF_FIELD(symval, i3c_device_id, part_id);
> + DEF_FIELD(symval, i3c_device_id, extra_info);
> +
> + strcpy(alias, "i3c:");
> + ADD(alias, "dcr", match_flags & I3C_MATCH_DCR, dcr);
> + ADD(alias, "manuf", match_flags & I3C_MATCH_MANUF, dcr);

^manuf_id

> + ADD(alias, "part", match_flags & I3C_MATCH_PART, dcr);

^part_id

> + ADD(alias, "ext", match_flags & I3C_MATCH_EXTRA_INFO, dcr);

^extra_info