On 11/25/2025 7:49 PM, Greg Kroah-Hartman wrote:
>> +static umode_t typec_is_visible(struct kobject *kobj, struct attribute
>> *attr, int n)
>> +{
>> + if (is_typec_port(kobj_to_dev(kobj)->parent))
>
> Why look at the parent? Doesn't the device have a type that should show
> this?
>
> Otherwise, looks good to me.
They have same deivce type "typec_altmode_dev_type".
The parent device has a different device type to distinguish between
port device and partner device.
>
> thanks,
>
> greg k-h
>
>
--
Best,
Chaoyi