diff mbox series

[RFC] dm: uclass: add functions to get device by platdata

Message ID 81657eea-7215-3a7e-f6fa-1ddce4eb2c11@collabora.com
State New
Headers show
Series [RFC] dm: uclass: add functions to get device by platdata | expand

Commit Message

Walter Lozano March 5, 2020, 2:06 p.m. UTC
Hi Simon,

On 5/3/20 10:54, Walter Lozano wrote:
> Let me check if I understand correctly, your suggestion is to do 
> something like diff --git a/include/dm/uclass.h b/include/dm/uclass.h 
> index 92c07f8426..bf09dadf3f 100644 --- a/include/dm/uclass.h +++ 
> b/include/dm/uclass.h
>
> @@ -167,8 +167,8 @@ int uclass_get_device(enum uclass_id id, int 
> index, struct udevice **devp);
>
> ?int uclass_get_device_by_name(enum uclass_id id, const char *name, 
> ????????????????????????????? struct udevice **devp); -int 
> uclass_get_device_by_platdata(enum uclass_id id, void *platdata, 
> -???????????????????????????? struct udevice **devp);
>
> +int uclass_get_device_by_struct(enum uclass_id id, enum dm_struct_t 
> struct_id, +???????????????????????????? void *struct_pointer, struct 
> udevice **devp); ?/** ? * uclass_get_device_by_seq() - Get a uclass 
> device based on an ID and sequence ? *
>
> If that is the case, I would be happy to help.
>
> Also, if my understanding is correct, could you elaborate which cases 
> are you trying to cover with this approach? 

Sorry, it looks like the last part of the email test got screw.

If I understand correctly, your suggestion is to change


If that is the case, I would be happy to help.

Also, if my understanding is correct, could you elaborate which cases
are trying to cover with this approach?

Regards,

Walter
diff mbox series

Patch

diff --git a/include/dm/uclass.h b/include/dm/uclass.h
index 92c07f8426..bf09dadf3f 100644
--- a/include/dm/uclass.h
+++ b/include/dm/uclass.h
@@ -167,8 +167,8 @@  int uclass_get_device(enum uclass_id id, int index, struct udevice **devp);
  int uclass_get_device_by_name(enum uclass_id id, const char *name,
                               struct udevice **devp);
  
-int uclass_get_device_by_platdata(enum uclass_id id, void *platdata,
-                             struct udevice **devp);
+int uclass_get_device_by_struct(enum uclass_id id, enum dm_struct_t , struct_id,
+                             void *struct_pointer, struct udevice **devp);
  /**
   * uclass_get_device_by_seq() - Get a uclass device based on an ID and sequence
   *