81 if ((data[0] != 0) && (data[0] != 1)) {
83 "Not a valid Data !!! ,Data should be 1 or 0\n");
117 unsigned int ui_NoOfChannel;
118 unsigned int ui_Temp, ui_Temp1;
120 if (ui_NoOfChannel > 15) {
122 "Invalid Channel Numbers !!!, Channel Numbers must be between 0 and 15\n");
125 if (
devpriv->b_OutputMemoryStatus) {
131 if ((data[1] != 0) && (data[1] != 1)) {
133 "Invalid Data[1] value !!!, Data[1] should be 0 or 1\n");
139 data[0] = (data[0] << ui_NoOfChannel) | ui_Temp;
144 switch (ui_NoOfChannel) {
161 data[0] = data[0] | ui_Temp;
171 printk(
"\nSpecified channel not supported\n");
178 data[0] = ~data[0] & 0x1;
180 ui_Temp1 = ui_Temp1 << ui_NoOfChannel;
181 ui_Temp = ui_Temp | ui_Temp1;
182 data[0] = (data[0] << ui_NoOfChannel) ^ 0xffff;
183 data[0] = data[0] & ui_Temp;
189 switch (ui_NoOfChannel) {
191 data[0] = ~data[0] & 0x3;
194 ui_Temp1 << 2 * data[2];
195 ui_Temp = ui_Temp | ui_Temp1;
203 data[0] = ~data[0] & 0xf;
206 ui_Temp1 << 4 * data[2];
207 ui_Temp = ui_Temp | ui_Temp1;
215 data[0] = ~data[0] & 0xff;
218 ui_Temp1 << 8 * data[2];
219 ui_Temp = ui_Temp | ui_Temp1;
238 printk(
"\nSpecified channel not supported\n");
243 printk(
"\nSpecified functionality does not exist\n");
272 unsigned int ui_Temp;
273 unsigned int ui_NoOfChannel;
275 if (ui_NoOfChannel > 15) {
277 "Invalid Channel Numbers !!!, Channel Numbers must be between 0 and 15\n");
280 if ((data[0] != 0) && (data[0] != 1)) {
282 "Invalid Data[0] value !!!, Data[0] should be 0 or 1\n");
288 *data = (*data >> ui_NoOfChannel) & 0x1;
292 switch (ui_NoOfChannel) {
294 *data = (*data >> (2 * data[1])) & 3;
298 *data = (*data >> (4 * data[1])) & 15;
302 *data = (*data >> (8 * data[1])) & 255;
314 printk(
"\nSpecified channel not supported \n");
353 data[1] = data[1] >> 16;
358 printk(
"\nThe input parameters are wrong\n");
402 printk(
"\nSpecified functionality does not exist\n");