root/arch/x86/platform/intel-mid/device_libs/platform_msic_ocd.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. msic_ocd_platform_data

   1 // SPDX-License-Identifier: GPL-2.0-only
   2 /*
   3  * platform_msic_ocd.c: MSIC OCD platform data initialization file
   4  *
   5  * (C) Copyright 2013 Intel Corporation
   6  * Author: Sathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@intel.com>
   7  */
   8 
   9 #include <linux/kernel.h>
  10 #include <linux/interrupt.h>
  11 #include <linux/scatterlist.h>
  12 #include <linux/sfi.h>
  13 #include <linux/init.h>
  14 #include <linux/gpio.h>
  15 #include <linux/mfd/intel_msic.h>
  16 #include <asm/intel-mid.h>
  17 
  18 #include "platform_msic.h"
  19 
  20 static void __init *msic_ocd_platform_data(void *info)
  21 {
  22         static struct intel_msic_ocd_pdata msic_ocd_pdata;
  23         int gpio;
  24 
  25         gpio = get_gpio_by_name("ocd_gpio");
  26 
  27         if (gpio < 0)
  28                 return NULL;
  29 
  30         msic_ocd_pdata.gpio = gpio;
  31         msic_pdata.ocd = &msic_ocd_pdata;
  32 
  33         return msic_generic_platform_data(info, INTEL_MSIC_BLOCK_OCD);
  34 }
  35 
  36 static const struct devs_id msic_ocd_dev_id __initconst = {
  37         .name = "msic_ocd",
  38         .type = SFI_DEV_TYPE_IPC,
  39         .delay = 1,
  40         .msic = 1,
  41         .get_platform_data = &msic_ocd_platform_data,
  42 };
  43 
  44 sfi_device(msic_ocd_dev_id);

/* [<][>][^][v][top][bottom][index][help] */