lkml.org 
[lkml]   [2019]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/7] ASoC: amd: Registering device endpoints using MFD framework
On Thu, 10 Oct 2019, RAVULAPATI, VISHNU VARDHAN RAO wrote:

> Hi Lee,
>
> We have two instances BT and I2S.
> We need to create devices with same name added with number of device
> like example:
> acp3x_i2s_playcap.1.auto<http://1.auto>
> acp3x_i2s_playcap.2.auto<http://2.auto>
>
> by using MFD we can make it happen automatically by giving
> "acp3x_i2s_playcap" and other extension will be added by MFD add device API.

The auto extension is handed by the platform_deivce_alloc() API.

platform_device_alloc("acp3x_i2s_playcap", PLATFORM_DEVID_AUTO);

> This helps us by rectifying the renaming issue which we get by using
> Platform_dev_create API`s.If we have to use platform related APIs then
> we need to give different naming conventions while creating the devices
> and cant use it in loop as we have 3 devices we need to call three
> explicitly.This make our code lengthy.
> If we use MFD it would help us a lot.
>
> Please suggest us how can we proceed.

You have 2 choices available to you based on whether your device is an
MFD or not:

If yes, move it (or a part of it) to drivers/mfd.
If no, then use the platform_device_*() API.

--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

\
 
 \ /
  Last update: 2019-10-14 09:04    [W:0.072 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site