Currently value of chan_id field is updated by dmaengine.c while the dma deviceis registered. In some cases the controller driver may need to assign channelnumbers by itself. For example, dw_dmac.c wants to control the order in whichchannels are allocated by dmaengine. So it added channels inside channel list ofdma_device in reverse order. Now channel 7 is allocated first and channel 0 isallocated last.

But as the channel ids are updated by dmaengine, channel numbers in sysfs willbe overwritten if controller has added channels in reverse order. To representcorrect channel number in sysfs, it is required that dmaengine must not assumethat first channel in list is channel 0 and last is 7.

To handled this situation, chan_ids_set is passed by controller driver insidestruct dma_device. Controller drivers that need to set channel numbersthemselves must pass this field as true.