Re: [PATCH V1 2/2] ASoC: codecs: Add aw88081 amplifier driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Oct 19, 2024 at 09:18:59 -0700, yesanishhere@xxxxxxxxx wrote:
> On Fri, Oct 18, 2024 at 2:44 AM <wangweidong.a@xxxxxxxxxx> wrote:
>>
>> From: Weidong Wang <wangweidong.a@xxxxxxxxxx>
>>
>> The driver is for amplifiers aw88081 of Awinic Technology Corporation.
>> The awinic AW88081 is an I2S/TDM input, high efficiency digital
>> Smart K audio amplifier
>>
>> Signed-off-by: Weidong Wang <wangweidong.a@xxxxxxxxxx>

...

>> +#define AW88081_INIT_PROFILE           (0)
>> +
>> +#define AW88081_PROFILE_EXT(xname, profile_info, profile_get, profile_set) \
>> +{ \
>> +       .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
>> +       .name = xname, \
>> +       .info = profile_info, \
>> +       .get = profile_get, \
>> +       .put = profile_set, \
>> +}
>> +
>> +enum {
>> +       AW88081_SYNC_START = 0,
>> +       AW88081_ASYNC_START,
>> +};
>> +
>> +enum aw88081_id {
>> +       AW88081_CHIP_ID = 0x2116,
>> +};
>> +
>> +enum {
>> +       AW88081_500_US = 500,
>> +       AW88081_1000_US = 1000,
>> +       AW88081_2000_US = 2000,
>> +       AW88081_5000_US = 5000,
>> +};
>> +
>> +enum {
>> +       AW88081_DEV_PW_OFF = 0,
>> +       AW88081_DEV_PW_ON,
>> +};
>> +
>> +enum {
>> +       AW88081_DEV_FW_FAILED = 0,
>> +       AW88081_DEV_FW_OK,
>> +};
>> +
>> +struct aw88081 {
>> +       struct aw_device *aw_pa;
>> +       struct mutex lock;
>> +       struct delayed_work start_work;
>> +       struct regmap *regmap;
>> +       struct aw_container *aw_cfg;
>> +
>> +       bool phase_sync;
>> +};

> Are you sharing this struct declaration with any other file?
> If not, move it to .c file. I think it is better to keep register
> definitions in .h and rest move it to .c file if you are not sharing
> with anyone else.

Thank you very much for your review.
I will move this struct to the .c file in patch V2.

>> +
>> +#endif
>> --
>> 2.47.0
>>
>>

Best regards,
Weidong Wang





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux