1 // Copyright 2017 The Fuchsia Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #pragma once 6 7 #include <ddk/mmio-buffer.h> 8 #include <ddk/protocol/gpioimpl.h> 9 #include <ddk/protocol/platform/device.h> 10 #include <zircon/listnode.h> 11 #include <zircon/types.h> 12 #include <threads.h> 13 14 typedef struct { 15 list_node_t node; 16 mtx_t lock; 17 mmio_buffer_t buffer; 18 uint32_t gpio_start; 19 uint32_t gpio_count; 20 const uint32_t* irqs; 21 uint32_t irq_count; 22 } pl061_gpios_t; 23 24 // PL061 GPIO protocol ops uses pl061_gpios_t* for ctx 25 extern gpio_impl_protocol_ops_t pl061_proto_ops; 26