Lines Matching +full:chan +full:- +full:name
1 // SPDX-License-Identifier: GPL-2.0
3 * arch/sh/drivers/dma/dma-sysfs.c
7 * Copyright (C) 2004 - 2006 Paul Mundt
19 .name = "dma",
37 channel->chan, info->name, in dma_show_devices()
38 channel->dev_id); in dma_show_devices()
62 return sprintf(buf, "%s\n", channel->dev_id); in dma_show_dev_id()
70 strcpy(channel->dev_id, buf); in dma_store_dev_id()
84 dma_configure_channel(channel->vchan, config); in dma_store_config()
95 return sprintf(buf, "0x%08x\n", channel->mode); in dma_show_mode()
103 channel->mode = simple_strtoul(buf, NULL, 0); in dma_store_mode()
114 return sprintf(buf, fmt, channel->field); \
121 int dma_create_sysfs_files(struct dma_channel *chan, struct dma_info *info) in dma_create_sysfs_files() argument
123 struct device *dev = &chan->dev; in dma_create_sysfs_files()
124 char name[16]; in dma_create_sysfs_files() local
127 dev->id = chan->vchan; in dma_create_sysfs_files()
128 dev->bus = &dma_subsys; in dma_create_sysfs_files()
141 dev_err(&info->pdev->dev, "Failed creating attrs\n"); in dma_create_sysfs_files()
145 snprintf(name, sizeof(name), "dma%d", chan->chan); in dma_create_sysfs_files()
146 return sysfs_create_link(&info->pdev->dev.kobj, &dev->kobj, name); in dma_create_sysfs_files()
149 void dma_remove_sysfs_files(struct dma_channel *chan, struct dma_info *info) in dma_remove_sysfs_files() argument
151 struct device *dev = &chan->dev; in dma_remove_sysfs_files()
152 char name[16]; in dma_remove_sysfs_files() local
160 snprintf(name, sizeof(name), "dma%d", chan->chan); in dma_remove_sysfs_files()
161 sysfs_remove_link(&info->pdev->dev.kobj, name); in dma_remove_sysfs_files()